我收到了这个错误。它在说ClassLoader referenced unknown path
我不知道该怎么办?谁能解决我的问题?
03-11 01:35:46.231 3040-3040/com.pptsindia.feedapp I/art: Not late-enabling -Xcheck:jni (already on)
03-11 01:35:46.418 3040-3040/com.pptsindia.feedapp W/System: ClassLoader referenced unknown path: /data/app/com.pptsindia.feedapp-1/lib/x86
03-11 01:35:46.884 3040-3040/com.pptsindia.feedapp D/AndroidRuntime: Shutting down VM
03-11 01:35:46.886 3040-3040/com.pptsindia.feedapp E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.pptsindia.feedapp, PID: 3040
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.pptsindia.feedapp/com.pptsindia.feedapp.MainActivity}: android.view.InflateException: Binary XML file line #14: Binary XML file line #14: Error inflating class at.markushi.ui.CircleButton
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: android.view.InflateException: Binary XML file line #14: Binary XML file line #14: Error inflating class at.markushi.ui.CircleButton
at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at com.pptsindia.feedapp.MainActivity$PlaceholderFragment.onCreateView(MainActivity.java:33)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1974)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617)
at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:339)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:602)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1237)
at android.app.Activity.performStart(Activity.java:6253)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: android.view.InflateException: Binary XML file line #14: Error inflating class at.markushi.ui.CircleButton
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:838)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at com.pptsindia.feedapp.MainActivity$PlaceholderFragment.onCreateView(MainActivity.java:33)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1974)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617)
at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:339)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:602)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1237)
at android.app.Activity.performStart(Activity.java:6253)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.ClassNotFoundException: Didn't find class "at.markushi.ui.CircleButton" on path: DexPathList[[zip file "/data/app/com.pptsindia.feedapp-1/base.apk"],nativeLibraryDirectories=[/data/app/com.pptsindia.feedapp-1/lib/x86, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at android.view.LayoutInflater.createView(LayoutInflater.java:583)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:838)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at com.pptsindia.feedapp.MainActivity$PlaceholderFragment.onCreateView(MainActivity.java:33)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1974)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617)
at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:339)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:602)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1237)
at android.app.Activity.performStart(Activity.java:6253)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Suppressed: java.lang.ClassNotFoundException: at.markushi.ui.CircleButton
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 30 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
03-11 01:35:51.964 3040-3040/? I/Process: Sending signal. PID: 3040 SIG: 9
答案 0 :(得分:16)
对于那些将来会发现这个帖子仍在寻找答案的人(就像我一样)。
W / System:ClassLoader引用了未知路径:/ data / app /[...]/ lib / x86
是我在LogCat中唯一的错误/警告。在尝试了几乎任何事情后,在Android操作系统中清理应用数据(设置 - >应用程序 - > MyApp - >内存 - >清除数据)是唯一有效的解决方案。
我希望它对某人有帮助。
答案 1 :(得分:12)
W / System:ClassLoader引用了未知路径:/data/app/com.pptsindia.feedapp-1/lib/x86
不是错误。这是系统发出的警告。
您的错误实际上有点低于:
致命的例外:主要
流程:com.pptsindia.feedapp,PID:3040
java.lang.RuntimeException:无法启动活动ComponentInfo {com.pptsindia.feedapp / com.pptsindia.feedapp.MainActivity}:android.view.InflateException:二进制XML文件行#14:二进制XML文件行#14:在课堂上输入错误at.markushi.ui.CircleButton
基本上,您的XML文件存在问题。
所以你必须继续阅读堆栈,以确保你找到问题的根源。正如您所看到的,logcat在其记录的每一行上都显示了一个前缀
V
- 详细(最低优先级)
D
- 调试
I
- 信息
W
- 警告
E
- 错误
F
- 致命
S
- 无声(最高优先级,无需打印任何内容)
有关Android Developer - Debugging log的更多信息。
修改强>
如果没有进一步的信息,就无法知道实际问题是什么。您必须提供XML文件,但在这种情况下,我建议您再打开一个问题。
答案 2 :(得分:3)
在我的情况下,Android Studio 3.0中的即时运行。我已禁用它,我终于可以在调试模式下运行应用程序了!
看起来Instant Run还有错误......
要找到它:文件 - >设置 - >构建,执行,部署 - >即时运行