本文介紹了如何修復(fù) ClassNotFoundException?的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!
問(wèn)題描述
這很奇怪...我已將 sdk 版本更新為 25,然后嘗試午餐應(yīng)用程序.. 并得到這樣的錯(cuò)誤
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
我已經(jīng)將所有依賴項(xiàng)更新為 25,但無(wú)論如何我都會(huì)收到此錯(cuò)誤.
I have already updated all dependency to 25 but anyway I get this error.
錯(cuò)誤說(shuō)我沒(méi)有這個(gè)類,但我有
Error said that I don't have such class, but I have
我做錯(cuò)了什么?如何解決這個(gè)問(wèn)題?
What am I doing wrong? How to fix this issue?
謝謝
推薦答案
好吧,我遇到了和我剛用過(guò)的一樣的:
Well I faced the same I just used :
文件 -> 使緩存無(wú)效/重新啟動(dòng)
File -> Invalidate Caches / Restart
它對(duì)我有用.
這篇關(guān)于如何修復(fù) ClassNotFoundException?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!