Open BackPackerDz opened 9 years ago
can you provide me more details about this issue? Like the OS version and some more information that will help me try to replicate this issue on simulator.
It's Android 4.1 version and sorry I don't have another useful information
Alright, I will try to replicate
same issue too...
Last time I tried using the library sample on Sony device running Android 4.1.2, I could not replicate the crash. If you can give me more details about the problem/crash that will help.
I got the same issue with "Galaxy Tab2 10.1 (espresso10wifi)" Android 4.1
java.lang.RuntimeException: startPreview failed at android.hardware.Camera.startPreview(Native Method) at com.commonsware.cwac.camera.CameraView.j(CameraView.java:533) at com.commonsware.cwac.camera.CameraView.a(CameraView.java:528) at com.commonsware.cwac.camera.CameraView.onMeasure(CameraView.java:203) at android.view.View.measure(View.java:15479) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4828) at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) at android.view.View.measure(View.java:15479) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4828) at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) at android.view.View.measure(View.java:15479) at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1456) at android.view.View.measure(View.java:15479) at android.widget.RelativeLayout.measureChild(RelativeLayout.java:602) at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:415) at android.view.View.measure(View.java:15479) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4828) at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) at android.view.View.measure(View.java:15479) at android.widget.LinearLayout.measureVertical(LinearLayout.java:833) at android.widget.LinearLayout.onMeasure(LinearLayout.java:574) at android.view.View.measure(View.java:15479) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4828) at android.widget.FrameLayout.onMeasure(FrameLayout.java:310) at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2359) at android.view.View.measure(View.java:15479) at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1968) at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1214) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1387) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4464) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725) at android.view.Choreographer.doCallbacks(Choreographer.java:555) at android.view.Choreographer.doFrame(Choreographer.java:525) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711) at android.os.Handler.handleCallback(Handler.java:615) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4895) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761) at dalvik.system.NativeStart.main(Native Method)
Same issue with android 4.0.3 emulator in Eclipse:
java.lang.RuntimeException: startPreview failed at android.hardware.Camera.startPreview(Native Method) at com.commonsware.cwac.camera.CameraView.startPreview(CameraView.java:533) at com.commonsware.cwac.camera.CameraView.initPreview(CameraView.java:528) at com.commonsware.cwac.camera.CameraView.onMeasure(CameraView.java:203) at android.view.View.measure(View.java:12723) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698) at android.widget.FrameLayout.onMeasure(FrameLayout.java:293) at android.view.View.measure(View.java:12723) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698) at android.widget.FrameLayout.onMeasure(FrameLayout.java:293) at android.view.View.measure(View.java:12723) at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1456) at android.view.View.measure(View.java:12723) at android.widget.RelativeLayout.measureChild(RelativeLayout.java:579) at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:392) at android.view.View.measure(View.java:12723) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698) at android.widget.FrameLayout.onMeasure(FrameLayout.java:293) at android.view.View.measure(View.java:12723) at android.widget.LinearLayout.measureVertical(LinearLayout.java:812) at android.widget.LinearLayout.onMeasure(LinearLayout.java:553) at android.view.View.measure(View.java:12723) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698) at android.widget.FrameLayout.onMeasure(FrameLayout.java:293) at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2092) at android.view.View.measure(View.java:12723) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1064) at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2442) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4424) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method)
THe CwacCamera fragment doesnt work with emulators
I came across the same error. But only if the keyboard is visible, a quick fix for me was making sure keyboards getting closed before starting the intent
same error here.
same error here in samasung device how to solve
Got the same error on Samsung Prime .........
Hi, please I got this error when I use the app with Xperia S (LT26i)
java.lang.RuntimeException: startPreview failed at android.hardware.Camera.startPreview(Native Method) at com.commonsware.cwac.camera.CameraView.j(CameraView.java:533) at com.commonsware.cwac.camera.CameraView.a(CameraView.java:528) at com.commonsware.cwac.camera.CameraView.b(CameraView.java:511) at com.commonsware.cwac.camera.TexturePreviewStrategy.onSurfaceTextureAvailable(TexturePreviewStrategy.java:45) at android.view.TextureView.getHardwareLayer(TextureView.java:368) at android.view.View.getDisplayList(View.java:12511) at android.view.View.getDisplayList(View.java:12586) at android.view.View.draw(View.java:13315) at android.view.ViewGroup.drawChild(ViewGroup.java:3037) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2907) at android.view.View.getDisplayList(View.java:12540) at android.view.View.getDisplayList(View.java:12586) at android.view.View.draw(View.java:13315) at android.view.ViewGroup.drawChild(ViewGroup.java:3037) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2907) at android.view.View.getDisplayList(View.java:12540) at android.view.View.getDisplayList(View.java:12586) at android.view.View.draw(View.java:13315) at android.view.ViewGroup.drawChild(ViewGroup.java:3037) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2907) at android.view.View.getDisplayList(View.java:12540) at android.view.View.getDisplayList(View.java:12586) at android.view.View.draw(View.java:13315) at android.view.ViewGroup.drawChild(ViewGroup.java:3037) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2907) at android.view.View.draw(View.java:13594) at android.support.v4.view.ViewPager.draw(ViewPager.java:2176) at android.view.View.getDisplayList(View.java:12542) at android.view.View.getDisplayList(View.java:12586) at android.view.View.draw(View.java:13315) at android.view.ViewGroup.drawChild(ViewGroup.java:3037) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2907) at android.view.View.getDisplayList(View.java:12540) at android.view.View.getDisplayList(View.java:12586) at android.view.View.draw(View.java:13315) at android.view.ViewGroup.drawChild(ViewGroup.java:3037) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2907) at android.view.View.draw(View.java:13594) at android.widget.FrameLayout.draw(FrameLayout.java:479) at android.view.View.getDisplayList(View.java:12542) at android.view.View.getDisplayList(View.java:12586) at android.view.View.draw(View.java:13315) at android.view.ViewGroup.drawChild(ViewGroup.java:3037) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2907) at android.view.View.getDisplayList(View.java:12540) at android.view.View.getDisplayList(View.java:12586) at android.view.View.draw(View.java:13315) at android.view.ViewGroup.drawChild(ViewGroup.java:3037) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2907) at android.view.View.draw(View.java:13594) at android.widget.FrameLayout.draw(FrameLayout.java:479) at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2189) at android.view.View.getDisplayList(View.java:12542) at android.view.View.getDisplayList(View.java:12586) at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1168) at android.view.ViewRootImpl.draw(ViewRootImpl.java:2157) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2029) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1840) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1004) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4223) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725) at android.view.Choreographer.doCallbacks(Choreographer.java:555) at android.view.Choreographer.doFrame(Choreographer.java:525) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711) at android.os.Handler.handleCallback(Handler.java:615) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:213) at android.app.ActivityThread.main(ActivityThread.java:4787) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556) at dalvik.system.NativeStart.main(Native Method)