0
안드로이드 용 Tensorflow
데모를 실행하려했습니다. (https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/android) 내 전화는 API 레벨 22입니다. 데모를 실행 한 다음 지시 사항을 실행합니다. 카메라 서비스 오류에 연결하지 못했습니다. 안드로이드를 처음 사용했습니다. 이 문제를 해결하는 방법? 해결할 수있는 단서를주세요. Tensorflow android 데모에서 오류가 발생했습니다. 카메라 서비스에 연결하지 못했습니다.
이 오류
은 내가12 - 20 16: 29: 20.150 7901 - 7901/org.tensorflow.demo E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.tensorflow.demo, PID: 7901
java.lang.RuntimeException: Fail to connect to camera service
at android.hardware.Camera. <init> (Camera.java: 497)
at android.hardware.Camera.open(Camera.java: 342)
at org.tensorflow.demo.LegacyCameraConnectionFragment$1.onSurfaceTextureAvailable(LegacyCameraConnectionFragment.java: 80)
at android.view.TextureView.getHardwareLayer(TextureView.java: 370)
at android.view.View.updateDisplayListIfDirty(View.java: 14144)
at android.view.View.getDisplayList(View.java: 14189)
at android.view.View.draw(View.java: 14959)
at android.view.ViewGroup.drawChild(ViewGroup.java: 3405)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java: 3198)
at android.view.View.updateDisplayListIfDirty(View.java: 14162)
at android.view.View.getDisplayList(View.java: 14189)
at android.view.View.draw(View.java: 14959)
at android.view.ViewGroup.drawChild(ViewGroup.java: 3405)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java: 3198)
at android.view.View.draw(View.java: 15234)
at android.widget.FrameLayout.draw(FrameLayout.java: 598)
at android.view.View.updateDisplayListIfDirty(View.java: 14167)
at android.view.View.getDisplayList(View.java: 14189)
at android.view.View.draw(View.java: 14959)
at android.view.ViewGroup.drawChild(ViewGroup.java: 3405)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java: 3198)
at android.view.View.updateDisplayListIfDirty(View.java: 14162)
at android.view.View.getDisplayList(View.java: 14189)
at android.view.View.draw(View.java: 14959)
at android.view.ViewGroup.drawChild(ViewGroup.java: 3405)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java: 3198)
at android.view.View.updateDisplayListIfDirty(View.java: 14162)
at android.view.View.getDisplayList(View.java: 14189)
at android.view.View.draw(View.java: 14959)
at android.view.ViewGroup.drawChild(ViewGroup.java: 3405)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java: 3198)
at android.view.View.draw(View.java: 15234)
at android.widget.FrameLayout.draw(FrameLayout.java: 598)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java: 2650)
at android.view.View.updateDisplayListIfDirty(View.java: 14167)
at android.view.View.getDisplayList(View.java: 14189)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java: 273)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java: 279)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java: 318)
at android.view.ViewRootImpl.draw(ViewRootImpl.java: 2530)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java: 2352)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java: 1982)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java: 1061)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java: 5885)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java: 767)
at android.view.Choreographer.doCallbacks(Choreographer.java: 580)
at android.view.Choreographer.doFrame(Choreographer.java: 550)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java: 753)
at android.os.Handler.handleCallback(Handler.java: 739)
at android.os.Handler.dispatchMessage(Handler.java: 95)
at android.os.Looper.loop(Looper.java: 135)
at android.app.ActivityThread.main(ActivityThread.java: 5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java: 372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java: 903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java: 698)
코드를 여기에 게시하십시오. – vm345
https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/android 다음은 Google에서 제공 한 코드입니다. –