Expo detached app crashing during runtime

Hi,

Whenever I run my app in development, the app builds in android studio but then crashes once it hits runtime on my device. “myApp has stopped \n restart app”. The app was running fine in production up until the most r ecent update where I made some javascript changes and then updated the versionCode, versionName in the gradle; and RELEASE_CHANNEL string in appConstants. The app works fine on ios. Here’s my logcat

08-30 10:52:01.588 25282-25282/com.myApp.myApp2 E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.myApp.myApp2, PID: 25282
java.lang.RuntimeException: Unable to instantiate application host.exp.exponent.MainApplication: java.lang.ClassNotFoundException: Didn’t find class “host.exp.exponent.MainApplication” on path: DexPathList[[zip file “/data/app/com.myApp.myApp2-1/base.apk”],nativeLibraryDirectories=[/data/app/com.myApp.myApp2-1/lib/arm, /data/app/com.myApp.myApp2-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:846)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5850)
at android.app.ActivityThread.-wrap3(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1699)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6682)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
Caused by: java.lang.ClassNotFoundException: Didn’t find class “host.exp.exponent.MainApplication” on path: DexPathList[[zip file “/data/app/com.myApp.myApp2-1/base.apk”],nativeLibraryDirectories=[/data/app/commyApp.myApp2-1/lib/arm, /data/app/com.myApp.myApp2strong text-1/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:5850)
at android.app.ActivityThread.-wrap3(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1699)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6682)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
Suppressed: java.lang.NoClassDefFoundError: Failed resolution of: Lhost/exp/exponent/ExpoApplication;
at java.lang.VMClassLoader.findLoadedClass(Native Method)
at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:742)
at java.lang.ClassLoader.loadClass(ClassLoader.java:362)
… 12 more
Caused by: java.lang.ClassNotFoundException: Didn’t find class “host.exp.exponent.ExpoApplication” on path: DexPathList[[zip file “/data/app/com.myApp.myApp2-1/base.apk”],nativeLibraryDirectories=[/data/app/com.myApp.myApp2-1/lib/arm, /data/app/com.myApp.myApp2-1/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)
… 15 more

Hey @wrightmk,

This looks like it could be the same mulitdex error we’ve encountered before. Unfortunately we don’t have a great solution for it at the moment, but building for release or setting minSdkVersion to 21 should get things working for you.

Let me know if that helps.

Cheers,

Adam

no dice. the weirdest part is the app runs flawlessly on my coworkers computer, but not on mine and we’re both running off the same branch on our github repo…

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.