错误TensorflowLite主Android Studio

时间:2018-08-24 22:57:28

标签: android-studio tensorflow-lite

我正在尝试在大学的示例应用程序中实现一个tensorflow模型,但是在执行发现tensorflow模型的活动时,它会产生错误,并且应用程序将关闭。

这是错误

    E/AndroidRuntime: FATAL EXCEPTION: main
                  Process: com.example.hhurtado.tarsius, PID: 10316
                  java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.hhurtado.tarsius/com.example.hhurtado.tarsius.Objetos}: android.view.InflateException: Binary XML file line #8: Binary XML file line #8: Error inflating class com.example.android.Objetos
                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2830)
                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2905)
                      at android.app.ActivityThread.-wrap11(Unknown Source:0)
                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1606)
                      at android.os.Handler.dispatchMessage(Handler.java:105)
                      at android.os.Looper.loop(Looper.java:169)
                      at android.app.ActivityThread.main(ActivityThread.java:6595)
                      at java.lang.reflect.Method.invoke(Native Method)
                      at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
                   Caused by: android.view.InflateException: Binary XML file line #8: Binary XML file line #8: Error inflating class com.example.android.Objetos
                   Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class com.example.android.Objetos
                   Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.android.Objetos" on path: DexPathList[[zip file "/data/app/com.example.hhurtado.tarsius-dtFIIqS62tYsrW9HfXSajQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.hhurtado.tarsius-dtFIIqS62tYsrW9HfXSajQ==/lib/arm64, /system/fake-libs64, /data/app/com.example.hhurtado.tarsius-dtFIIqS62tYsrW9HfXSajQ==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]
                      at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
                      at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
                      at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
                      at android.view.LayoutInflater.createView(LayoutInflater.java:606)
                      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790)
                      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
                      at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
                      at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
                      at com.example.hhurtado.tarsius.Camera2BasicFragment.onCreateView(Camera2BasicFragment.java:245)
                      at android.app.Fragment.performCreateView(Fragment.java:2611)
                      at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1276)
                      at android.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1549)
                      at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1611)
                      at android.app.BackStackRecord.executeOps(BackStackRecord.java:807)
                      at android.app.FragmentManagerImpl.executeOps(FragmentManager.java:2394)
                      at android.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2189)
                      at android.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2142)
                      at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2049)
                      at android.app.FragmentManagerImpl.dispatchMoveToState(FragmentManager.java:3044)
                      at android.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:2991)
                      at android.app.FragmentController.dispatchActivityCreated(FragmentController.java:178)
                      at android.app.Activity.performCreateCommon(Activity.java:7010)
                      at android.app.Activity.performCreate(Activity.java:7018)
                      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2783)
                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2905)
                      at android.app.ActivityThread.-wrap11(Unknown Source:0)
                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1606)
                      at android.os.Handler.dispatchMessage(Handler.java:105)
    E/AndroidRuntime: FATAL EXCEPTION: main
                  Process: com.example.hhurtado.tarsius, PID: 10316
                  java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.hhurtado.tarsius/com.example.hhurtado.tarsius.Objetos}: android.view.InflateException: Binary XML file line #8: Binary XML file line #8: Error inflating class com.example.android.Objetos
                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2830)
                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2905)
                      at android.app.ActivityThread.-wrap11(Unknown Source:0)
                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1606)
                      at android.os.Handler.dispatchMessage(Handler.java:105)
                      at android.os.Looper.loop(Looper.java:169)
                      at android.app.ActivityThread.main(ActivityThread.java:6595)
                      at java.lang.reflect.Method.invoke(Native Method)
                      at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
                   Caused by: android.view.InflateException: Binary XML file line #8: Binary XML file line #8: Error inflating class com.example.android.Objetos
                   Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class com.example.android.Objetos
                   Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.android.Objetos" on path: DexPathList[[zip file "/data/app/com.example.hhurtado.tarsius-dtFIIqS62tYsrW9HfXSajQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.hhurtado.tarsius-dtFIIqS62tYsrW9HfXSajQ==/lib/arm64, /system/fake-libs64, /data/app/com.example.hhurtado.tarsius-dtFIIqS62tYsrW9HfXSajQ==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]
                      at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
                      at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
                      at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
                      at android.view.LayoutInflater.createView(LayoutInflater.java:606)
                      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790)
                      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
                      at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
                      at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
                      at com.example.hhurtado.tarsius.Camera2BasicFragment.onCreateView(Camera2BasicFragment.java:245)
                      at android.app.Fragment.performCreateView(Fragment.java:2611)
                      at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1276)
                      at android.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1549)
                      at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1611)
                      at android.app.BackStackRecord.executeOps(BackStackRecord.java:807)
                      at android.app.FragmentManagerImpl.executeOps(FragmentManager.java:2394)
                      at android.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2189)
                      at android.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2142)
                      at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2049)
                      at android.app.FragmentManagerImpl.dispatchMoveToState(FragmentManager.java:3044)
                      at android.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:2991)
                      at android.app.FragmentController.dispatchActivityCreated(FragmentController.java:178)
                      at android.app.Activity.performCreateCommon(Activity.java:7010)
                      at android.app.Activity.performCreate(Activity.java:7018)
                      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2783)
                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2905)
                      at android.app.ActivityThread.-wrap11(Unknown Source:0)
                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1606)
                      at android.os.Handler.dispatchMessage(Handler.java:105)

0 个答案:

没有答案