E / AndroidRuntime(致命异常:主PID:4435)

【E / AndroidRuntime(致命异常:主PID:4435)】知是行的主意,行是知的功夫。这篇文章主要讲述E / AndroidRuntime:致命异常:主PID:4435相关的知识,希望能为你提供帮助。
使用模拟器当我尝试启动相机时我遇到了错误:我试图重建,重启和不同的模拟器但不工作如何修复它?提前致谢

09-03 18:43:58.349 4435-4435/com.google.android.gms.samples.vision.face.facetracker E/AndroidRuntime: FATAL EXCEPTION: main Process: com.google.android.gms.samples.vision.face.facetracker, PID: 4435 java.lang.RuntimeException: Could not find requested camera. at com.google.android.gms.vision.CameraSource.zzchq(Unknown Source) at com.google.android.gms.vision.CameraSource.start(Unknown Source) at com.google.android.gms.samples.vision.face.facetracker.ui.camera.CameraSourcePreview.startIfReady(CameraSourcePreview.java:86) at com.google.android.gms.samples.vision.face.facetracker.ui.camera.CameraSourcePreview.access$100(CameraSourcePreview.java:31) at com.google.android.gms.samples.vision.face.facetracker.ui.camera.CameraSourcePreview$SurfaceCallback.surfaceCreated(CameraSourcePreview.java:109) at android.view.SurfaceView.updateWindow(SurfaceView.java:618) at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:161) at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:944) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2205) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6337) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874) at android.view.Choreographer.doCallbacks(Choreographer.java:686) at android.view.Choreographer.doFrame(Choreographer.java:621) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

答案你不能在模拟器上运行一个应用程序,它需要物理资源像相机,传感器一样运行。要测试此类应用程序,您需要一个具有工作资源的真实设备。
仿真器只是一个具有Android OS真实图像的虚拟设备

    推荐阅读