Hi everyone! I am trying to create an app bundle for Google Play using the Build App Bundle check from BuildSettings. The bundle should contain all three architectures: x86, ARMv7 and ARM64. I'm using a custom mainTemplate.gradle and for building the App Bundle I have to set "com.android.tools.build:gradle" to version 3.2.0. The problem is that with this gradle version my app crashes right on launch but if I use 3.0.0 the app works fine (but the App Bundle build fails). Crash error from Monitor.bat : 07-19 13:19:48.033: E/AndroidRuntime(31506): java.lang.RuntimeException: Unable to instantiate application android.support.multidex.MultiDexApplication: java.lang.ClassNotFoundException: Didn't find class "android.support.multidex.MultiDexApplication" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/<my app>-CL5QNweziJv6wfVPWDMNsg==/base.apk"],nativeLibraryDirectories=[/data/app/<my app>-CL5QNweziJv6wfVPWDMNsg==/lib/arm64, /data/app/<my app>-CL5QNweziJv6wfVPWDMNsg==/base.apk!/lib/arm64-v8a, /system/lib64]] 07-19 13:19:48.033: E/AndroidRuntime(31506): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.multidex.MultiDexApplication" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/<my app>-CL5QNweziJv6wfVPWDMNsg==/base.apk"],nativeLibraryDirectories=[/data/app/<my app>-CL5QNweziJv6wfVPWDMNsg==/lib/arm64, /data/app/<my app>-CL5QNweziJv6wfVPWDMNsg==/base.apk!/lib/arm64-v8a, /system/lib64]]
No, I don't, but i have this 2 lines in my mainTemplate : it.setProperty("android.useAndroidX", true) it.setProperty("android.enableJetifier", true) I solved it by changing this line : android:name="android.support.multidex.MultiDexApplication" in : android:name="androidx.multidex.MultiDexApplication" in my AndroidManifest.
Yes, you need to change from android.support to androidx.* if you are using androidX libraries. As your mainTemplate is patched with androidX(by Play Services Resolver most likely), the above change should work fine.
hii, I have done this error in my code, I removed android:name="androidx.multidex.MultiDexApplication" in Application. Like this. try this method so you don't need to use custom Gradle. <application android:theme="@StyLe/UnityThemeSelector" android:icon="@Mipmap/app_icon" android:label="@String/app_name">