-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.RuntimeException: Unable to instantiate activity #1445
Comments
Cordova run work, but when using cordova build with build.json provided on the doc, it's not working. |
My build.json: |
Fixed by editing \platforms\android\app\src\main\AndroidManifest.xml adding a dot before MainActivity |
Have you changed the app id since you used It's being fixed by #1154 but this will only be included in our next 11.x release. The current workaround is to re-add the platform via
|
Hello, I don't known if i'm clear, i'm french sorry. |
No worries, you're good. Ok thanks for confirming that this isn't related to the aforementioned issue. I think the next best thing to help move this along is if you can provide a sample reproduction repository that reproduces this issue.
To avoid testing the bundle by uploading it to the play store, you can use Google's Bundletool. With the bundle tool, you can generate an APK Set, which can then be installed onto your device. This is how I will also test the reproduction sample. |
Hello, sorry for the delay. |
And thanks for bundletool |
Closing as stale. |
Bug Report
Problem
Application crash when launch from Play Store (Appbundle), but no probleme with APK
What is expected to happen?
Application launch
What does actually happen?
Crash, no window or anything launched. just received an ANR
Information
06-27 12:19:42.079 18662 18662 E AndroidRuntime: FATAL EXCEPTION: main
06-27 12:19:42.079 18662 18662 E AndroidRuntime: Process: io.aninet.companion, PID: 18662
06-27 12:19:42.079 18662 18662 E AndroidRuntime: java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{io.aninet.companion/io.aninet.companion.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "io.aninet.companion.MainActivity" on path: DexPathList[[zip file "/data/app/~~sWz4qul_KjndIS0h84bN3A==/io.aninet.companion-tdXX0h9zkUn8RR35_i3aKw==/base.apk", zip file "/data/app/~~sWz4qul_KjndIS0h84bN3A==/io.aninet.companion-tdXX0h9zkUn8RR35_i3aKw==/split_config.fr.apk", zip file "/data/app/~~sWz4qul_KjndIS0h84bN3A==/io.aninet.companion-tdXX0h9zkUn8RR35_i3aKw==/split_config.xxhdpi.apk"],nativeLibraryDirectories=[/data/app/~~sWz4qul_KjndIS0h84bN3A==/io.aninet.companion-tdXX0h9zkUn8RR35_i3aKw==/lib/arm64, /system/lib64, /system_ext/lib64]]
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3613)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3844)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2315)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:201)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.os.Looper.loop(Looper.java:288)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7929)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "io.aninet.companion.MainActivity" on path: DexPathList[[zip file "/data/app/~~sWz4qul_KjndIS0h84bN3A==/io.aninet.companion-tdXX0h9zkUn8RR35_i3aKw==/base.apk", zip file "/data/app/~~sWz4qul_KjndIS0h84bN3A==/io.aninet.companion-tdXX0h9zkUn8RR35_i3aKw==/split_config.fr.apk", zip file "/data/app/~~sWz4qul_KjndIS0h84bN3A==/io.aninet.companion-tdXX0h9zkUn8RR35_i3aKw==/split_config.xxhdpi.apk"],nativeLibraryDirectories=[/data/app/~~sWz4qul_KjndIS0h84bN3A==/io.aninet.companion-tdXX0h9zkUn8RR35_i3aKw==/lib/arm64, /system/lib64, /system_ext/lib64]]
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:45)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.Instrumentation.newActivity(Instrumentation.java:1328)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3600)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: ... 12 more
06-27 12:19:42.079 18662 18662 E AndroidRuntime: Suppressed: java.io.IOException: Failed to open dex files from /data/app/~~sWz4qul_KjndIS0h84bN3A==/io.aninet.companion-tdXX0h9zkUn8RR35_i3aKw==/split_config.fr.apk because: Entry not found
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at dalvik.system.DexFile.openDexFileNative(Native Method)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at dalvik.system.DexFile.openDexFile(DexFile.java:371)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at dalvik.system.DexFile.(DexFile.java:113)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at dalvik.system.DexFile.(DexFile.java:86)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at dalvik.system.DexPathList.loadDexFile(DexPathList.java:438)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at dalvik.system.DexPathList.makeDexElements(DexPathList.java:397)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at dalvik.system.DexPathList.(DexPathList.java:166)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:160)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:130)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at dalvik.system.PathClassLoader.(PathClassLoader.java:146)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:93)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:134)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:126)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.ApplicationLoaders.getClassLoaderWithSharedLibraries(ApplicationLoaders.java:61)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:1034)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.LoadedApk.getClassLoader(LoadedApk.java:1126)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.LoadedApk.getResources(LoadedApk.java:1374)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.ContextImpl.createAppContext(ContextImpl.java:3090)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.ContextImpl.createAppContext(ContextImpl.java:3082)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6707)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2141)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: ... 7 more
06-27 12:19:42.079 18662 18662 E AndroidRuntime: Suppressed: java.io.IOException: Failed to open dex files from /data/app/~~sWz4qul_KjndIS0h84bN3A==/io.aninet.companion-tdXX0h9zkUn8RR35_i3aKw==/split_config.xxhdpi.apk because: Entry not found
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at dalvik.system.DexFile.openDexFileNative(Native Method)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at dalvik.system.DexFile.openDexFile(DexFile.java:371)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at dalvik.system.DexFile.(DexFile.java:113)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at dalvik.system.DexFile.(DexFile.java:86)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at dalvik.system.DexPathList.loadDexFile(DexPathList.java:438)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at dalvik.system.DexPathList.makeDexElements(DexPathList.java:397)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at dalvik.system.DexPathList.(DexPathList.java:166)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:160)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:130)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at dalvik.system.PathClassLoader.(PathClassLoader.java:146)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:93)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:134)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:126)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.ApplicationLoaders.getClassLoaderWithSharedLibraries(ApplicationLoaders.java:61)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:1034)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.LoadedApk.getClassLoader(LoadedApk.java:1126)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.LoadedApk.getResources(LoadedApk.java:1374)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.ContextImpl.createAppContext(ContextImpl.java:3090)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.ContextImpl.createAppContext(ContextImpl.java:3082)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6707)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2141)
06-27 12:19:42.079 18662 18662 E AndroidRuntime: ... 7 more
0
Command or Code
cordova run
Environment, Platform, Device
Windows 10 (21H2)
Phone side: Android 12 or 13 (same results)
And Google Play testing devices is showing same problem.
Version information
Cordova 11.0
Installed platforms:
android 10.1.2
Checklist
The text was updated successfully, but these errors were encountered: