How to fix ClassNotFoundException?(如何修复 ClassNotFoundException?)
问题描述
这很奇怪...我已将 sdk 版本更新为 25,然后尝试午餐应用程序.. 并得到这样的错误
This is something strange... I have updeted sdk version to 25 and after that tried to lunch app.. and got such error
FATAL EXCEPTION: main
Process: com.fittingroom.newtimezone, PID: 2465
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.fittingroom.newtimezone/com.fittingroom.newtimezone.view.ActivitySplash}: java.lang.ClassNotFoundException: Didn't find class "com.fittingroom.newtimezone.view.ActivitySplash" on path: DexPathList[[zip file "/data/app/com.fittingroom.newtimezone-2/base.apk"],nativeLibraryDirectories=[/data/app/com.fittingroom.newtimezone-2/lib/arm, /vendor/lib, /system/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3093)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
at android.app.ActivityThread.access$1100(ActivityThread.java:221)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7224)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.fittingroom.newtimezone.view.ActivitySplash" on path: DexPathList[[zip file "/data/app/com.fittingroom.newtimezone-2/base.apk"],nativeLibraryDirectories=[/data/app/com.fittingroom.newtimezone-2/lib/arm, /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.app.Instrumentation.newActivity(Instrumentation.java:1095)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3083)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
at android.app.ActivityThread.access$1100(ActivityThread.java:221)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7224)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Suppressed: java.lang.ClassNotFoundException: com.fittingroom.newtimezone.view.ActivitySplash
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)
... 12 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
我已经将所有依赖项更新为 25,但无论如何我都会收到此错误.
I have already updated all dependency to 25 but anyway I get this error.
错误说我没有这个类,但我有
Error said that I don't have such class, but I have
我做错了什么?如何解决这个问题?
What am I doing wrong? How to fix this issue?
谢谢
推荐答案
好吧,我遇到了和我刚用过的一样的:
Well I faced the same I just used :
文件 -> 使缓存无效/重新启动
File -> Invalidate Caches / Restart
它对我有用.
这篇关于如何修复 ClassNotFoundException?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何修复 ClassNotFoundException?
基础教程推荐
- 降序排序:Java Map 2022-01-01
- Java:带有char数组的println给出乱码 2022-01-01
- 设置 bean 时出现 Nullpointerexception 2022-01-01
- 在 Libgdx 中处理屏幕的正确方法 2022-01-01
- Java Keytool 导入证书后出错,"keytool error: java.io.FileNotFoundException &拒绝访问" 2022-01-01
- “未找到匹配项"使用 matcher 的 group 方法时 2022-01-01
- FirebaseListAdapter 不推送聊天应用程序的单个项目 - Firebase-Ui 3.1 2022-01-01
- 如何使用 Java 创建 X509 证书? 2022-01-01
- 无法使用修饰符“public final"访问 java.util.Ha 2022-01-01
- 减少 JVM 暂停时间 >1 秒使用 UseConcMarkSweepGC 2022-01-01