Android Question MultiDex crash on android 4.4

panagiotisden2

Active Member
Licensed User
Longtime User
updated my app in play store and i used multidex in the updated app, the next day i have some users reporting my app cant even open and the crash report is here:
B4X:
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 "/data/app/com.orionapps.testkok-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.orionapps.testkok-1, /vendor/lib, /system/lib]]
    at android.app.LoadedApk.makeApplication(LoadedApk.java:516)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4555)
    at android.app.ActivityThread.access$1500(ActivityThread.java:151)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1402)
    at android.os.Handler.dispatchMessage(Handler.java:110)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:5333)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
    at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.multidex.MultiDexApplication" on path: DexPathList[[zip file "/data/app/com.orionapps.testkok-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.orionapps.testkok-1, /vendor/lib, /system/lib]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
    at android.app.Instrumentation.newApplication(Instrumentation.java:975)
    at android.app.LoadedApk.makeApplication(LoadedApk.java:511)
    ... 11 more

they cant even see the app's main activity it crashes instantly.
i can confirm it works on many devices including mine without a problem and the crashes are all from android 4.4 users.
any clue here?
 

panagiotisden2

Active Member
Licensed User
Longtime User
Tested an apk compiled with the modified dexer with a couple devices in firebase test lab and it worked correctly (the previous apk with the original dexer failed) so it seems the problem is fixed.

Thanks again, Erel

fun fact: firebase test lab clicked my interstitial ad :p
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
library in a similar manner?
Even if i did not run into this problem; i have replaced the dexer.jar from the above post....

With the next B4A Update we all will get the new jar. I for myself already replaced it ;)
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Now that it has been reported that the new Dexter.jar fixes the issues with Android 4.X would you recommend that we replace our versions of the Dexter.jar library in a similar manner?
Yes. The important change is only relevant when MultiDex is enabled.

I will update the MultiDex tutorial.
 
Upvote 0
Top