Difficulty Debugging Android Build Issue

Hi team!

I’ve been having some issues building my Android application for the last few days. I was getting an error from react-native-unimodules when building my Android app which was saying that my “MainApplication” file couldn’t be found (talked about this here).

I’ve since updated to SDK 43 to get rid of unimodules. App now build successfully, but crashes upon open with a very similar error. Heres the results after debugging with adb logcat.

12-04 12:52:10.347  7632  7632 E AndroidRuntime: java.lang.RuntimeException: Unable to 
instantiate application build.skillspace.mobile.MainApplication: 
java.lang.ClassNotFoundException: Didn't find class "build.skillspace.mobile.MainApplication" on 
path: DexPathList[[zip file "/data/app/build.skillspace.mobile-u__xdzVX3RoMy92XhV-
UKg==/base.apk"],nativeLibraryDirectories=[/data/app/build.skillspace.mobile-
u__xdzVX3RoMy92XhV-UKg==/lib/x86, /data/app/build.skillspace.mobile-
u__xdzVX3RoMy92XhV-UKg==/base.apk!/lib/x86, /system/lib, /system/product/lib]]

Everything builds just fine locally. Build succeeds and runs as expected. Never had this issue until recently (though last build was a few months ago) and very little has changed in my android project (except for what I’ve now had to change when updating from SDK 40 to 43). When I was hitting this issue earlier in the week, absolutely nothing had changed at all.

I’m not sure how to debug any further since my local runs fine, build runs fine, but I still get this issue. I SUSPECT it could maybe have to do with my package name (build.skillspace.mobile) since the path includes the world “build” (resulting in app/src/main/java/build/skillspace/mobile/MainApplication.java). I actually had this issue in the past and had to instruct git to to INCLUDE this specific path in git (!build/ in app/src/main). I however have 0 clue how to check if this is for some reason the case again even though it hasn’t caused any issues in a long while. I WOULD try just renaming my package but I don’t believe the Play Store would let me do that.

Any help would really really be appreciated, this issue has kept me from releasing updates for about a week now.

Thanks!

Here is a fully stripped down version of my app if helpful (have tested and gets the same result). Only deps that I didn’t include is the firebase stuff that I’m using. Android directory should be completely the same minus firebase specific stuff.

https://github.com/TomHessburg/expoeashelp

One more quick follow up, tried running a build with --local and hit the same issue. An example build can be found here for anyone on the team if helpful.

I also ran a git clone of my project locally and everything seems to be in place.

Hi everyone! Just hoping to bump this up. Still unable to update my app on the Play Store and not too sure what else to try. I’ve got a reproducible example posted above.

Any direction would be greatly appreciated!