0

I'm receiving an extremely minimal error message, on the Play Dev Console. This appears to be a bug affecting many 4.4, 5.0 and 5.1 devices and the error is exactly the same on each:

java.lang.RuntimeException: 
  at android.app.LoadedApk.makeApplication (LoadedApk.java:572)
  at android.app.ActivityThread.handleBindApplication (ActivityThread.java:4760)
  at android.app.ActivityThread.access$1500 (ActivityThread.java:170)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1502)
  at android.os.Handler.dispatchMessage (Handler.java:111)
  at android.os.Looper.loop (Looper.java:194)
  at android.app.ActivityThread.main (ActivityThread.java:5568)
  at java.lang.reflect.Method.invoke (Method.java)
  at java.lang.reflect.Method.invoke (Method.java:372)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:955)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:750)
Caused by: java.lang.ClassNotFoundException: 
  at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:56)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:511)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:469)
  at android.app.Instrumentation.newApplication (Instrumentation.java:984)
  at android.app.LoadedApk.makeApplication (LoadedApk.java:567)

I'm not able to reproduce this bug on those versions of Android.

Please also see a screenshot of the affected devices reporting this issue in the Play console:

affected devices examples

Your assistance is appreciated!

Edit: the issue is not related to Multidex, version 38 of the APK as seen in the logs above had Multidex support enabled already. Moreover, Multidex support is not required on 5.0 or higher as per the Google docs. Is this a ProGuard issue? It seems most likely.

AutoM8R
  • 3,020
  • 3
  • 32
  • 52
  • have you included com.android.support:multidex lib ? – Umar Hussain Sep 12 '17 at 04:30
  • Multidex and disable Instant Run while building apk may help. – Harry T. Sep 12 '17 at 04:31
  • 2
    @Umar Hussain multidex support library is not needed on Android 5 and newer. Also, if applicaction has been compiled without problems, multidex is not even needed. – user1209216 Sep 12 '17 at 05:28
  • @user1209216 is correct, multidex should be required at compile time if exceeding the 64K limit. This is not the case though, unless it could be caused by one of my dependencies (exceeding 64K itself), however, again this would only cause the Dalvik VM to crash, and not 5.0 or 5.1. Correct? – AutoM8R Sep 12 '17 at 23:12
  • @AutoM8R Correct. – user1209216 Sep 13 '17 at 05:35
  • @TruongHieu thanks, but Instant Run can not be the issue in my opinion. I turned off Instant Run and rebuilt the production APK, no difference in file size, thus there can't be a significant difference in compiled code either. – AutoM8R Sep 13 '17 at 20:47

0 Answers0