When I unlock my phone again, I only get white screen in Camera Preview and some weird errors.
Interestingly, that doesn't happen if I put app in the background.
Errors:
W/PlatformViewsController( 8047): Creating a virtual display of size: [1631, 2900] may result in problems(https://github.com/flutter/flutter/issues/2897).It is larger than the device screen size: [1440, 2900].
D/Dialog ( 8047): mIsSamsungBasicInteraction = false
D/Dialog ( 8047): mIsSamsungBasicInteraction = false, isMetaDataInActivity = false
E/MethodChannel#flutter/platform_views( 8047): Failed to handle method call
E/MethodChannel#flutter/platform_views( 8047): android.view.InflateException: Binary XML file line #8 in com.example.locker:layout/activity_camera: Binary XML file line #8 in com.example.locker:layout/activity_camera: Error inflating class fragment
E/MethodChannel#flutter/platform_views( 8047): Caused by: android.view.InflateException: Binary XML file line #8 in com.example.locker:layout/activity_camera: Error inflating class fragment
E/MethodChannel#flutter/platform_views( 8047): Caused by: java.lang.IllegalArgumentException: Binary XML file line #8: Duplicate id 0x7f070025, tag null, or parent id 0xffffffff with another fragment for com.ric.adv_camera.CameraFragment
E/MethodChannel#flutter/platform_views( 8047): at android.app.FragmentManagerImpl.onCreateView(FragmentManager.java:3568)
E/MethodChannel#flutter/platform_views( 8047): at android.app.FragmentController.onCreateView(FragmentController.java:104)
E/MethodChannel#flutter/platform_views( 8047): at android.app.Activity.onCreateView(Activity.java:7016)
E/MethodChannel#flutter/platform_views( 8047): at android.view.LayoutInflater.tryCreateView(LayoutInflater.java:1069)
E/MethodChannel#flutter/platform_views( 8047): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:997)
E/MethodChannel#flutter/platform_views( 8047): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:961)
E/MethodChannel#flutter/platform_views( 8047): at android.view.LayoutInflater.rInflate(LayoutInflater.java:1123)
E/MethodChannel#flutter/platform_views( 8047): at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084)
E/MethodChannel#flutter/platform_views( 8047): at android.view.LayoutInflater.inflate(LayoutInflater.java:682)
E/MethodChannel#flutter/platform_views( 8047): at android.view.LayoutInflater.inflate(LayoutInflater.java:534)
E/MethodChannel#flutter/platform_views( 8047): at android.view.LayoutInflater.inflate(LayoutInflater.java:481)
E/MethodChannel#flutter/platform_views( 8047): at com.ric.adv_camera.AdvCamera.(AdvCamera.java:80)
E/MethodChannel#flutter/platform_views( 8047): at com.ric.adv_camera.AdvCameraFactory.create(AdvCameraFactory.java:20)
E/MethodChannel#flutter/platform_views( 8047): at io.flutter.plugin.platform.SingleViewPresentation.onCreate(SingleViewPresentation.java:179)
E/MethodChannel#flutter/platform_views( 8047): at android.app.Dialog.dispatchOnCreate(Dialog.java:554)
E/MethodChannel#flutter/platform_views( 8047): at android.app.Dialog.show(Dialog.java:394)
E/MethodChannel#flutter/platform_views( 8047): at android.app.Presentation.show(Presentation.java:274)
E/MethodChannel#flutter/platform_views( 8047): at io.flutter.plugin.platform.VirtualDisplayController.(VirtualDisplayController.java:94)
E/MethodChannel#flutter/platform_views( 8047): at io.flutter.plugin.platform.VirtualDisplayController.create(VirtualDisplayController.java:47)
E/MethodChannel#flutter/platform_views( 8047): at io.flutter.plugin.platform.PlatformViewsController$1.createPlatformView(PlatformViewsController.java:112)
E/MethodChannel#flutter/platform_views( 8047): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:95)
E/MethodChannel#flutter/platform_views( 8047): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:59)
E/MethodChannel#flutter/platform_views( 8047): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:226)
E/MethodChannel#flutter/platform_views( 8047): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/MethodChannel#flutter/platform_views( 8047): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:631)
E/MethodChannel#flutter/platform_views( 8047): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#flutter/platform_views( 8047): at android.os.MessageQueue.next(MessageQueue.java:336)
E/MethodChannel#flutter/platform_views( 8047): at android.os.Looper.loop(Looper.java:197)
E/MethodChannel#flutter/platform_views( 8047): at android.app.ActivityThread.main(ActivityThread.java:7857)
E/MethodChannel#flutter/platform_views( 8047): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter/platform_views( 8047): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/MethodChannel#flutter/platform_views( 8047): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1076)
E/flutter ( 8047): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(error, Binary XML file line #8 in com.example.locker:layout/activity_camera: Binary XML file line #8 in com.example.locker:layout/activity_camera: Error inflating class fragment, null)
E/flutter ( 8047): #0 StandardMethodCodec.decodeEnvelope
package:flutter/…/services/message_codecs.dart:569
E/flutter ( 8047): #1 MethodChannel._invokeMethod
package:flutter/…/services/platform_channel.dart:156
E/flutter ( 8047):
E/flutter ( 8047): #2 MethodChannel.invokeMethod
package:flutter/…/services/platform_channel.dart:329
E/flutter ( 8047): #3 AndroidViewController._create
package:flutter/…/services/platform_views.dart:633
E/flutter ( 8047): #4 AndroidViewController.setSize
package:flutter/…/services/platform_views.dart:550
E/flutter ( 8047): #5 RenderAndroidView._sizePlatformView
package:flutter/…/rendering/platform_view.dart:175
E/flutter ( 8047): #6 RenderAndroidView.performResize
package:flutter/…/rendering/platform_view.dart:156
E/flutter ( 8047): #7 RenderObject.layout
package:flutter/…/rendering/object.dart:1746
E/flutter ( 8047): #8 RenderProxyBoxMixin.performLayout
package:flutter/…/rendering/proxy_box.dart:111
E/flutter ( 8047): #9 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #10 RenderConstrainedOverflowBox.performLayout
package:flutter/…/rendering/shifted_box.dart:580
E/flutter ( 8047): #11 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #12 RenderProxyBoxMixin.performLayout
package:flutter/…/rendering/proxy_box.dart:111
E/flutter ( 8047): #13 _RenderCustomClip.performLayout
package:flutter/…/rendering/proxy_box.dart:1248
E/flutter ( 8047): #14 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #15 _RenderLayoutBuilder.performLayout
package:flutter/…/widgets/layout_builder.dart:246
E/flutter ( 8047): #16 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #17 RenderStack.performLayout
package:flutter/…/rendering/stack.dart:556
E/flutter ( 8047): #18 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #19 MultiChildLayoutDelegate.layoutChild
package:flutter/…/rendering/custom_layout.dart:171
E/flutter ( 8047): #20 _ScaffoldLayout.performLayout
package:flutter/…/material/scaffold.dart:484
E/flutter ( 8047): #21 MultiChildLayoutDelegate._callPerformLayout
package:flutter/…/rendering/custom_layout.dart:240
E/flutter ( 8047): #22 RenderCustomMultiChildLayoutBox.performLayout
package:flutter/…/rendering/custom_layout.dart:399
E/flutter ( 8047): #23 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #24 RenderProxyBoxMixin.performLayout
package:flutter/…/rendering/proxy_box.dart:111
E/flutter ( 8047): #25 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #26 RenderProxyBoxMixin.performLayout
package:flutter/…/rendering/proxy_box.dart:111
E/flutter ( 8047): #27 _RenderCustomClip.performLayout
package:flutter/…/rendering/proxy_box.dart:1248
E/flutter ( 8047): #28 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #29 RenderProxyBoxMixin.performLayout
package:flutter/…/rendering/proxy_box.dart:111
E/flutter ( 8047): #30 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #31 RenderProxyBoxMixin.performLayout
package:flutter/…/rendering/proxy_box.dart:111
E/flutter ( 8047): #32 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #33 RenderProxyBoxMixin.performLayout
package:flutter/…/rendering/proxy_box.dart:111
E/flutter ( 8047): #34 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #35 RenderProxyBoxMixin.performLayout
package:flutter/…/rendering/proxy_box.dart:111
E/flutter ( 8047): #36 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #37 RenderProxyBoxMixin.performLayout
package:flutter/…/rendering/proxy_box.dart:111
E/flutter ( 8047): #38 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #39 RenderProxyBoxMixin.performLayout
package:flutter/…/rendering/proxy_box.dart:111
E/flutter ( 8047): #40 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #41 RenderProxyBoxMixin.performLayout
Flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.17.1, on Microsoft Windows [Version 10.0.18362.239], locale sl-SI)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Android Studio (version 3.6)
[√] VS Code, 64-bit edition (version 1.38.1)
[√] Connected device (1 available)
Hi, I noticed one possible bug.
My case is as followed:
Interestingly, that doesn't happen if I put app in the background.
Errors:
W/PlatformViewsController( 8047): Creating a virtual display of size: [1631, 2900] may result in problems(https://github.com/flutter/flutter/issues/2897).It is larger than the device screen size: [1440, 2900]. D/Dialog ( 8047): mIsSamsungBasicInteraction = false D/Dialog ( 8047): mIsSamsungBasicInteraction = false, isMetaDataInActivity = false E/MethodChannel#flutter/platform_views( 8047): Failed to handle method call E/MethodChannel#flutter/platform_views( 8047): android.view.InflateException: Binary XML file line #8 in com.example.locker:layout/activity_camera: Binary XML file line #8 in com.example.locker:layout/activity_camera: Error inflating class fragment E/MethodChannel#flutter/platform_views( 8047): Caused by: android.view.InflateException: Binary XML file line #8 in com.example.locker:layout/activity_camera: Error inflating class fragment E/MethodChannel#flutter/platform_views( 8047): Caused by: java.lang.IllegalArgumentException: Binary XML file line #8: Duplicate id 0x7f070025, tag null, or parent id 0xffffffff with another fragment for com.ric.adv_camera.CameraFragment E/MethodChannel#flutter/platform_views( 8047): at android.app.FragmentManagerImpl.onCreateView(FragmentManager.java:3568) E/MethodChannel#flutter/platform_views( 8047): at android.app.FragmentController.onCreateView(FragmentController.java:104) E/MethodChannel#flutter/platform_views( 8047): at android.app.Activity.onCreateView(Activity.java:7016) E/MethodChannel#flutter/platform_views( 8047): at android.view.LayoutInflater.tryCreateView(LayoutInflater.java:1069) E/MethodChannel#flutter/platform_views( 8047): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:997) E/MethodChannel#flutter/platform_views( 8047): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:961) E/MethodChannel#flutter/platform_views( 8047): at android.view.LayoutInflater.rInflate(LayoutInflater.java:1123) E/MethodChannel#flutter/platform_views( 8047): at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084) E/MethodChannel#flutter/platform_views( 8047): at android.view.LayoutInflater.inflate(LayoutInflater.java:682) E/MethodChannel#flutter/platform_views( 8047): at android.view.LayoutInflater.inflate(LayoutInflater.java:534) E/MethodChannel#flutter/platform_views( 8047): at android.view.LayoutInflater.inflate(LayoutInflater.java:481) E/MethodChannel#flutter/platform_views( 8047): at com.ric.adv_camera.AdvCamera.(AdvCamera.java:80)
E/MethodChannel#flutter/platform_views( 8047): at com.ric.adv_camera.AdvCameraFactory.create(AdvCameraFactory.java:20)
E/MethodChannel#flutter/platform_views( 8047): at io.flutter.plugin.platform.SingleViewPresentation.onCreate(SingleViewPresentation.java:179)
E/MethodChannel#flutter/platform_views( 8047): at android.app.Dialog.dispatchOnCreate(Dialog.java:554)
E/MethodChannel#flutter/platform_views( 8047): at android.app.Dialog.show(Dialog.java:394)
E/MethodChannel#flutter/platform_views( 8047): at android.app.Presentation.show(Presentation.java:274)
E/MethodChannel#flutter/platform_views( 8047): at io.flutter.plugin.platform.VirtualDisplayController.(VirtualDisplayController.java:94)
E/MethodChannel#flutter/platform_views( 8047): at io.flutter.plugin.platform.VirtualDisplayController.create(VirtualDisplayController.java:47)
E/MethodChannel#flutter/platform_views( 8047): at io.flutter.plugin.platform.PlatformViewsController$1.createPlatformView(PlatformViewsController.java:112)
E/MethodChannel#flutter/platform_views( 8047): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:95)
E/MethodChannel#flutter/platform_views( 8047): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:59)
E/MethodChannel#flutter/platform_views( 8047): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:226)
E/MethodChannel#flutter/platform_views( 8047): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/MethodChannel#flutter/platform_views( 8047): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:631)
E/MethodChannel#flutter/platform_views( 8047): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#flutter/platform_views( 8047): at android.os.MessageQueue.next(MessageQueue.java:336)
E/MethodChannel#flutter/platform_views( 8047): at android.os.Looper.loop(Looper.java:197)
E/MethodChannel#flutter/platform_views( 8047): at android.app.ActivityThread.main(ActivityThread.java:7857)
E/MethodChannel#flutter/platform_views( 8047): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter/platform_views( 8047): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/MethodChannel#flutter/platform_views( 8047): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1076)
E/flutter ( 8047): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(error, Binary XML file line #8 in com.example.locker:layout/activity_camera: Binary XML file line #8 in com.example.locker:layout/activity_camera: Error inflating class fragment, null)
E/flutter ( 8047): #0 StandardMethodCodec.decodeEnvelope
package:flutter/…/services/message_codecs.dart:569
E/flutter ( 8047): #1 MethodChannel._invokeMethod
package:flutter/…/services/platform_channel.dart:156
E/flutter ( 8047):
E/flutter ( 8047): #2 MethodChannel.invokeMethod
package:flutter/…/services/platform_channel.dart:329
E/flutter ( 8047): #3 AndroidViewController._create
package:flutter/…/services/platform_views.dart:633
E/flutter ( 8047): #4 AndroidViewController.setSize
package:flutter/…/services/platform_views.dart:550
E/flutter ( 8047): #5 RenderAndroidView._sizePlatformView
package:flutter/…/rendering/platform_view.dart:175
E/flutter ( 8047): #6 RenderAndroidView.performResize
package:flutter/…/rendering/platform_view.dart:156
E/flutter ( 8047): #7 RenderObject.layout
package:flutter/…/rendering/object.dart:1746
E/flutter ( 8047): #8 RenderProxyBoxMixin.performLayout
package:flutter/…/rendering/proxy_box.dart:111
E/flutter ( 8047): #9 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #10 RenderConstrainedOverflowBox.performLayout
package:flutter/…/rendering/shifted_box.dart:580
E/flutter ( 8047): #11 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #12 RenderProxyBoxMixin.performLayout
package:flutter/…/rendering/proxy_box.dart:111
E/flutter ( 8047): #13 _RenderCustomClip.performLayout
package:flutter/…/rendering/proxy_box.dart:1248
E/flutter ( 8047): #14 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #15 _RenderLayoutBuilder.performLayout
package:flutter/…/widgets/layout_builder.dart:246
E/flutter ( 8047): #16 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #17 RenderStack.performLayout
package:flutter/…/rendering/stack.dart:556
E/flutter ( 8047): #18 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #19 MultiChildLayoutDelegate.layoutChild
package:flutter/…/rendering/custom_layout.dart:171
E/flutter ( 8047): #20 _ScaffoldLayout.performLayout
package:flutter/…/material/scaffold.dart:484
E/flutter ( 8047): #21 MultiChildLayoutDelegate._callPerformLayout
package:flutter/…/rendering/custom_layout.dart:240
E/flutter ( 8047): #22 RenderCustomMultiChildLayoutBox.performLayout
package:flutter/…/rendering/custom_layout.dart:399
E/flutter ( 8047): #23 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #24 RenderProxyBoxMixin.performLayout
package:flutter/…/rendering/proxy_box.dart:111
E/flutter ( 8047): #25 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #26 RenderProxyBoxMixin.performLayout
package:flutter/…/rendering/proxy_box.dart:111
E/flutter ( 8047): #27 _RenderCustomClip.performLayout
package:flutter/…/rendering/proxy_box.dart:1248
E/flutter ( 8047): #28 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #29 RenderProxyBoxMixin.performLayout
package:flutter/…/rendering/proxy_box.dart:111
E/flutter ( 8047): #30 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #31 RenderProxyBoxMixin.performLayout
package:flutter/…/rendering/proxy_box.dart:111
E/flutter ( 8047): #32 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #33 RenderProxyBoxMixin.performLayout
package:flutter/…/rendering/proxy_box.dart:111
E/flutter ( 8047): #34 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #35 RenderProxyBoxMixin.performLayout
package:flutter/…/rendering/proxy_box.dart:111
E/flutter ( 8047): #36 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #37 RenderProxyBoxMixin.performLayout
package:flutter/…/rendering/proxy_box.dart:111
E/flutter ( 8047): #38 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #39 RenderProxyBoxMixin.performLayout
package:flutter/…/rendering/proxy_box.dart:111
E/flutter ( 8047): #40 RenderObject.layout
package:flutter/…/rendering/object.dart:1767
E/flutter ( 8047): #41 RenderProxyBoxMixin.performLayout
Flutter doctor: Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, v1.17.1, on Microsoft Windows [Version 10.0.18362.239], locale sl-SI)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3) [√] Android Studio (version 3.6) [√] VS Code, 64-bit edition (version 1.38.1) [√] Connected device (1 available)