E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.***.plants, PID:
23100
java.lang.RuntimeException: Unable to instantiate application com.***.MyApplication: java.lang.ClassNotFoundException: Didn't find
class
"com.****.MyApplication"
on path: DexPathList[[zip file
"/data/app/com.****.plants-1/base.apk"
],nativeLibraryDirectories=[/data/app/com.***.plants-
1
/lib/arm64, /system/fake-libs64, /data/app/com.***.plants-
1
/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:
853
)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:
5681
)
***
Caused by: java.lang.ClassNotFoundException: Didn't find
class
"com.***.MyApplication"
on path: DexPathList[[zip file
"/data/app/com.****.plants-1/base.apk"
],nativeLibraryDirectories=[/data/app/com.***.plants-
1
/lib/arm64, /system/fake-libs64, /data/app/com.***.plants-
1
/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
***
Solution:
Open the Settings: file-> settings, search Instant Run, uncheck Enable Instant Run to *** Figure?:
About Instant Run: update after Android Studio2.0 is a powerful! After the first run, the revised Code and other UI do not need to build! Quick to see the effect on the real machine! Save life