11-15 11:25:12.201 26192-26192/org.tensorflow.demo E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.tensorflow.demo, PID: 26192
java.lang.RuntimeException: Problem reading label file!
at org.tensorflow.demo.TensorFlowImageClassifier.create(TensorFlowImageClassifier.java:100)
at org.tensorflow.demo.ClassifierActivity.onPreviewSizeChosen(ClassifierActivity.java:114)
at org.tensorflow.demo.CameraActivity$5.onPreviewSizeChosen(CameraActivity.java:360)
at org.tensorflow.demo.CameraConnectionFragment.setUpCameraOutputs(CameraConnectionFragment.java:407)
at org.tensorflow.demo.CameraConnectionFragment.openCamera(CameraConnectionFragment.java:414)
at org.tensorflow.demo.CameraConnectionFragment.access$000(CameraConnectionFragment.java:64)
at org.tensorflow.demo.CameraConnectionFragment$1.onSurfaceTextureAvailable(CameraConnectionFragment.java:95)
at android.view.TextureView.getHardwareLayer(TextureView.java:389)
at android.view.TextureView.draw(TextureView.java:338)
at android.view.View.updateDisplayListIfDirty(View.java:17297)
at android.view.View.draw(View.java:18081)
at android.view.ViewGroup.drawChild(ViewGroup.java:3966)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3752)
at android.view.View.updateDisplayListIfDirty(View.java:17292)
at android.view.View.draw(View.java:18081)
at android.view.ViewGroup.drawChild(ViewGroup.java:3966)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3752)
at android.view.View.draw(View.java:18322)
at android.view.View.updateDisplayListIfDirty(View.java:17297)
at android.view.View.draw(View.java:18081)
at android.view.ViewGroup.drawChild(ViewGroup.java:3966)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3752)
at android.view.View.updateDisplayListIfDirty(View.java:17292)
at android.view.View.draw(View.java:18081)
at android.view.ViewGroup.drawChild(ViewGroup.java:3966)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3752)
at android.view.View.updateDisplayListIfDirty(View.java:17292)
at android.view.View.draw(View.java:18081)
at android.view.ViewGroup.drawChild(ViewGroup.java:3966)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3752)
at android.view.View.draw(View.java:18322)
at com.android.internal.policy.DecorView.draw(DecorView.java:854)
at android.view.View.updateDisplayListIfDirty(View.java:17297)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:666)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:672)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:780)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:3105)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2901)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2495)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1502)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7044)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:927)
at android.view.Choreographer.doCallbacks(Choreographer.java:702)
at android.view.Choreographer.doFrame(Choreographer.java:638)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:913)
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:6646)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)
Caused by: java.io.FileNotFoundException: imagenet_comp_graph_label_strings.txt
at android.content.res.AssetManager.openAsset(Native Method)
at android.content.res.AssetManager.open(AssetManager.java:421)
at android.content.res.AssetManager.open(AssetManager.java:395)
at org.tensorflow.demo.TensorFlowImageClassifier.create(TensorFlowImageClassifier.java:93)
at org.tensorflow.demo.ClassifierActivity.onPreviewSizeChosen(ClassifierActivity.java:114)
at org.tensorflow.demo.CameraActivity$5.onPreviewSizeChosen(CameraActivity.java:360)
at org.tensorflow.demo.CameraConnectionFragment.setUpCameraOutputs(CameraConnectionFragment.java:407)
at org.tensorflow.demo.CameraConnectionFragment.openCamera(CameraConnectionFragment.java:414)
at org.tensorflow.demo.CameraConnectionFragment.access$000(CameraConnectionFragment.java:64)
at org.tensorflow.demo.CameraConnectionFragment$1.onSurfaceTextureAvailable(CameraConnectionFragment.java:95)
at android.view.TextureView.getHardwareLayer(TextureView.java:389)
at android.view.TextureView.draw(TextureView.java:338)
at android.view.View.updateDisplayListIfDirty(View.java:17297)
at android.view.View.draw(View.java:18081)
at android.view.ViewGroup.drawChild(ViewGroup.java:3966)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3752)
at android.view.View.updateDisplayListIfDirty(View.java:17292)
at android.view.View.draw(View.java:18081)
at android.view.ViewGroup.drawChild(ViewGroup.java:3966)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3752)
at android.view.View.draw(View.java:18322)
at android.view.View.updateDisplayListIfDirty(View.java:17297)
at android.view.View.draw(View.java:18081)
at android.view.ViewGroup.drawChild(ViewGroup.java:3966)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3752)
at android.view.View.updateDisplayListIfDirty(View.java:17292)
at android.view.View.draw(View.java:18081)
at android.view.ViewGroup.drawChild(ViewGroup.java:3966)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3752)
at android.view.View.updateDisplayListIfDirty(View.java:17292)
at android.view.View.draw(View.java:18081)
at android.view.ViewGroup.drawChild(ViewGroup.java:3966)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3752)
at android.view.View.draw(View.java:18322)
at com.android.internal.policy.DecorView.draw(DecorView.java:854)
at android.view.View.updateDisplayListIfDirty(View.java:17297)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:666)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:672)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:780)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:3105)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2901)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2495)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1502)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7044)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:927)
at android.view.Choreographer.doCallbacks(Choreographer.java:702)
at android.view.Choreographer.doFrame(Choreographer.java:638)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:913)
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:6646)
at java.lang.reflect.Method.invoke(Native Method)
해결방법
AndroidManifest.xml에 아래 내용 추가.
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
'안드로이드OS > 문제해결' 카테고리의 다른 글
코틀린(Kotlin) Intel Hex to Bin 변환 소스 코드 (0) | 2020.02.10 |
---|---|
Error:Execution failed for task ':buildNativeBazel'. > A problem occurred starting process 'command '/usr/local/bin/bazel'' (0) | 2017.11.18 |
/bin/sh: 1: bc: not found (0) | 2017.01.31 |
How to use Screen Capture by adb in Android (0) | 2017.01.23 |
awk: line 2: function strtonum never defined (0) | 2017.01.20 |