i need your help. I got a Runtime error when updating my gradle from :
to :
Error Log : E/AndroidRuntime: FATAL EXCEPTION: main Process: id.android.steven.dev, PID: 5539 java.lang.RuntimeException: Unable to instantiate application id.android.steven.MyApplication: java.lang.ClassNotFoundException: Didn't find class "id.android.steven.MyApplication" on path: DexPathList[[zip file "/data/app/id.android.steven.dev-2/base.apk"],nativeLibraryDirectories=[/data/app/id.android.teven.dev-2/lib/arm, /data/app/id.android.steven.dev-2/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]] at android.app.LoadedApk.makeApplication(LoadedApk.java:846) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5944) at android.app.ActivityThread.-wrap3(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1710) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6776) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386) Caused by: java.lang.ClassNotFoundException: Didn't find class "id.android.steven.MyApplication" on path: DexPathList[[zip file "/data/app/id.android.steven.dev-2/base.apk"],nativeLibraryDirectories=[/data/app/id.android.steven.dev-2/lib/arm, /data/app/id.android.steven.dev-2/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:380) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at android.app.Instrumentation.newApplication(Instrumentation.java:1000) at android.app.LoadedApk.makeApplication(LoadedApk.java:835) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5944) at android.app.ActivityThread.-wrap3(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1710) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6776) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386) Suppressed: java.io.IOException: Failed to open dex files from /data/app/id.android.steven.dev-2/base.apk because: Failure to verify dex file '/data/app/id.android.steven.dev-2/base.apk': Out-of-order annotation_element name_idx: 681e then 681e at dalvik.system.DexFile.openDexFileNative(Native Method) at dalvik.system.DexFile.openDexFile(DexFile.java:373) at dalvik.system.DexFile.(DexFile.java:113) at dalvik.system.DexFile.(DexFile.java:78) at dalvik.system.DexPathList.loadDexFile(DexPathList.java:359) at dalvik.system.DexPathList.makeElements(DexPathList.java:323) at dalvik.system.DexPathList.makeDexElements(DexPathList.java:263) at dalvik.system.DexPathList.(DexPathList.java:126) at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:48) at dalvik.system.PathClassLoader.(PathClassLoader.java:64) at com.android.internal.os.PathClassLoaderFactory.createClassLoader(PathClassLoaderFactory.java:43) at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:58) at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:535) at android.app.LoadedApk.getClassLoader(LoadedApk.java:568) at android.app.ActivityThread.getTopLevelResources(ActivityThread.java:2053) at android.app.LoadedApk.getResources(LoadedApk.java:787) at android.app.ContextImpl.(ContextImpl.java:2266) at android.app.ContextImpl.createAppContext(ContextImpl.java:2210) at android.app.ContextImpl.createAppContext(ContextImpl.java:2196) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5861) ... 8 more
Thanks in advance :)
Just check if there is -overloadaggressively
in your application gradle, this method force overloading all method. If you use -overloadaggressively
, just disabled it and use another way.
Refer to this link.