java.lang.ClassNotFoundException: Didn't find class "com.camera.demo.ElephantApp" on path: DexPathLi

    --------- beginning of crash
05-16 11:00:00.682 17085-17085/com.camera.demo E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.camera.demo, PID: 17085
    java.lang.RuntimeException: Unable to instantiate application com.camera.demo.ElephantApp: java.lang.ClassNotFoundException: Didn't find class "com.camera.demo.ElephantApp" on path: DexPathList[[zip file "/data/app/com.camera.demo-SOT6BRHI-ahrK3pWD9VARw==/base.apk"],nativeLibraryDirectories=[/data/app/com.camera.demo-SOT6BRHI-ahrK3pWD9VARw==/lib/arm64, /data/app/com.camera.demo-SOT6BRHI-ahrK3pWD9VARw==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
        at android.app.LoadedApk.makeApplication(LoadedApk.java:1044)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6132)
        at android.app.ActivityThread.-wrap1(Unknown Source:0)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1840)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:200)
        at android.app.ActivityThread.main(ActivityThread.java:7038)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:521)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:837)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.camera.demo.ElephantApp" on path: DexPathList[[zip file "/data/app/com.camera.demo-SOT6BRHI-ahrK3pWD9VARw==/base.apk"],nativeLibraryDirectories=[/data/app/com.camera.demo-SOT6BRHI-ahrK3pWD9VARw==/lib/arm64, /data/app/com.camera.demo-SOT6BRHI-ahrK3pWD9VARw==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at android.app.Instrumentation.newApplication(Instrumentation.java:1088)
        at android.app.LoadedApk.makeApplication(LoadedApk.java:1038)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6132) 
        at android.app.ActivityThread.-wrap1(Unknown Source:0) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1840) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:200) 
        at android.app.ActivityThread.main(ActivityThread.java:7038) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:521) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:837) 

 

今天遇到一个变态的问题,同样的代码,运行小米和三星、华为手机都没有问题,but,OPPO findX手机就是不行,各种报上边的错误信息,build不行,clean不行,卸载重装不行,我也是纳了闷了,后边也是查资料得知,OPPO findX手机不支持Instant Run,OPPO R15也不支持,真是醉了,就你OPPO搞特殊吗!

解决方案如下,全当记录一下了:

android studio  File--setting--Instant Run  勾勾去掉  去掉 掉 掉...

java.lang.ClassNotFoundException: Didn't find class

 OK,可以了,我也是醉了,用OPPO手机的码友们,可长点心吧

你可能感兴趣的:(java.lang.ClassNotFoundException: Didn't find class "com.camera.demo.ElephantApp" on path: DexPathLi)