Ich versuche eine einfache Taschenlampe App zu machen und wenn ich teste, stürzt die App ab. Ich glaube, beim Versuch, auf die Kamera zuzugreifen, stimmt etwas nicht. Irgendwelche Vorschläge?Absturz beim Zugriff auf die Kamera?
W/CameraBase: An error occurred while connecting to camera: 0
W/CameraBase: An error occurred while connecting to camera: 0
W/CameraBase: An error occurred while connecting to camera: 0
W/CameraBase: An error occurred while connecting to camera: 0
W/CameraBase: An error occurred while connecting to camera: 0
I/Camera2Mode: fail
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Fail to connect to camera service
at android.hardware.Camera.open(Camera.java:479)
at android.hardware.Camera.open(Camera.java:547)
at android.view.View.performClick(View.java:5226)
at android.widget.CompoundButton.performClick(CompoundButton.java:122)
at android.view.View$PerformClick.run(View.java:21266)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95
at android.os.Looper.loop(Looper.java:168)
at android.app.ActivityThread.main(ActivityThread.java:5845)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)
D/Process: killProcess, pid=23317
D/Process: com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException:113 java.lang.ThreadGroup.uncaughtException:693 java.lang.ThreadGroup.uncaughtException:690
Disconnected from the target VM, address: 'localhost:8603', transport: 'socket'
reduzieren bitte Ihren Manifest-Code bitte. Welche Berechtigungen gibst du dort? –
stackoverflow.com/questions/23904459/android-java-lang-runtimeexception-fail-to-connect-to-camera-service –