Ejected app instantly crashes on standalone build, debug works fine

I run debug builds via pressing the play button in Android Studio and running it within an emulator. I run release builds via building an APK for “Generated Signed Bundle / APK” and dragging that onto the simulator (and onto my phone). I have gotten this setup to work once before, but has failed me ever since. Any ideas?

I use the debug build variant when debugging, and the release build variant when building the APK, so that isn’t an issue (AFAIK this changes whether it connects with the node backend).

Do you get any relevant error messages when you run adb logcat?

I found this
02-06 14:07:09.730 5412 5412 E AndroidRuntime: FATAL EXCEPTION: main
02-06 14:07:09.730 5412 5412 E AndroidRuntime: Process: com.labl.longform, PID: 5412
02-06 14:07:09.730 5412 5412 E AndroidRuntime: java.lang.RuntimeException: Unable to create application host.exp.exponent.MainApplication: java.lang.RuntimeException: NativeModuleDepsProvider could not find object for class class host.exp.exponent.f
02-06 14:07:09.730 5412 5412 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6465)
02-06 14:07:09.730 5412 5412 E AndroidRuntime: at android.app.ActivityThread.access$1300(ActivityThread.java:219)
02-06 14:07:09.730 5412 5412 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
02-06 14:07:09.730 5412 5412 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:107)
02-06 14:07:09.730 5412 5412 E AndroidRuntime: at android.os.Looper.loop(Looper.java:214)
02-06 14:07:09.730 5412 5412 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7356)
02-06 14:07:09.730 5412 5412 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
02-06 14:07:09.730 5412 5412 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
02-06 14:07:09.730 5412 5412 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
02-06 14:07:09.730 5412 5412 E AndroidRuntime: Caused by: java.lang.RuntimeException: NativeModuleDepsProvider could not find object for class class host.exp.exponent.f
02-06 14:07:09.730 5412 5412 E AndroidRuntime: at host.exp.exponent.l.a.a(NativeModuleDepsProvider.java:12)
02-06 14:07:09.730 5412 5412 E AndroidRuntime: at host.exp.exponent.l.a.b(NativeModuleDepsProvider.java:2)
02-06 14:07:09.730 5412 5412 E AndroidRuntime: at g.a.a.b.(Exponent.java:9)
02-06 14:07:09.730 5412 5412 E AndroidRuntime: at g.a.a.b.a(Exponent.java:4)
02-06 14:07:09.730 5412 5412 E AndroidRuntime: at host.exp.exponent.d.onCreate(ExpoApplication.java:9)
02-06 14:07:09.730 5412 5412 E AndroidRuntime: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1182)
02-06 14:07:09.730 5412 5412 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6460)
02-06 14:07:09.730 5412 5412 E AndroidRuntime: … 8 more

Removing minifyEnabled in build.gradle seems to sidestep the issue, but I don’t have any SVG or normal images packaged. Any ideas?

Running this through adb logcat, I have the following

02-08 17:03:25.863 27281 27281 W System.err: java.lang.NoSuchMethodException: host.exp.exponent.generated.AppConstants.get []
02-08 17:03:25.863 27281 27281 W System.err:    at java.lang.Class.getMethod(Class.java:2072)
02-08 17:03:25.863 27281 27281 W System.err:    at java.lang.Class.getMethod(Class.java:1693)
02-08 17:03:25.863 27281 27281 W System.err:    at host.exp.exponent.h.<clinit>(Unknown Source:48)
02-08 17:03:25.863 27281 27281 W System.err:    at host.exp.exponent.h.a(Unknown Source:0)
02-08 17:03:25.863 27281 27281 W System.err:    at host.exp.exponent.l.onCreate(Unknown Source:17)
02-08 17:03:25.863 27281 27281 W System.err:    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1182)
02-08 17:03:25.863 27281 27281 W System.err:    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6460)
02-08 17:03:25.863 27281 27281 W System.err:    at android.app.ActivityThread.access$1300(ActivityThread.java:219)
02-08 17:03:25.863 27281 27281 W System.err:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
02-08 17:03:25.863 27281 27281 W System.err:    at android.os.Handler.dispatchMessage(Handler.java:107)
02-08 17:03:25.863 27281 27281 W System.err:    at android.os.Looper.loop(Looper.java:214)
02-08 17:03:25.863 27281 27281 W System.err:    at android.app.ActivityThread.main(ActivityThread.java:7356)
02-08 17:03:25.863 27281 27281 W System.err:    at java.lang.reflect.Method.invoke(Native Method)
02-08 17:03:25.863 27281 27281 W System.err:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
02-08 17:03:25.863 27281 27281 W System.err:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
02-08 17:03:25.879 27281 27281 D AndroidRuntime: Shutting down VM
02-08 17:03:25.880 27281 27281 E AndroidRuntime: FATAL EXCEPTION: main
02-08 17:03:25.880 27281 27281 E AndroidRuntime: Process: com.labl.longform, PID: 27281
02-08 17:03:25.880 27281 27281 E AndroidRuntime: java.lang.RuntimeException: Unable to create application host.exp.exponent.MainApplication: e.a.a.g: Subscriber class host.exp.exponent.f.a.b.e has no public methods called onEvent
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6465)
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        at android.app.ActivityThread.access$1300(ActivityThread.java:219)
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:107)
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:214)
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:7356)
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
02-08 17:03:25.880 27281 27281 E AndroidRuntime: Caused by: e.a.a.g: Subscriber class host.exp.exponent.f.a.b.e has no public methods called onEvent
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        at e.a.a.n.a(Unknown Source:323)
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        at e.a.a.e.a(Unknown Source:7)
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        at e.a.a.e.d(Unknown Source:1)
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        at host.exp.exponent.f.a.a.<init>(Unknown Source:12)
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        at host.exp.exponent.f.a.b.c.<init>(Unknown Source:0)
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        at host.exp.exponent.f.a.b.l.<init>(Unknown Source:0)
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        at host.exp.exponent.f.a.b.e.<init>(Unknown Source:0)
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        at host.exp.exponent.f.a.c.<init>(Unknown Source:35)
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        at host.exp.exponent.c.a.<init>(Unknown Source:56)
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        at host.exp.exponent.c.a.a(Unknown Source:6)
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        at g.a.a.i.<init>(Unknown Source:26)
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        at g.a.a.i.a(Unknown Source:6)
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        at host.exp.exponent.l.onCreate(Unknown Source:50)
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1182)
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6460)
02-08 17:03:25.880 27281 27281 E AndroidRuntime:        ... 8 more

EDIT: Turns out I can only confirm that images don’t work, I assumed a library used SVG when it wasn’t (react-navigation)