Home > Software engineering >  Debug APK works fine, APKS from bundle works fine but release bundle does not work properly
Debug APK works fine, APKS from bundle works fine but release bundle does not work properly

Time:10-02

I generated and tested a debug .apk on a real device and it works properly.

Then I generated a debug bundle and extracted with bundletools a debug .apks and installed/tested it on real device and it works fine.

Then I generated a release bundle and pushed it to Google Play Store as internal release but the app hang when I try to log in.

There is no bug whatsoever in the code. Only the release bundle does not work properly (hangs). What could be the reason? How to fix this??

Edit: It appears that AJAX calls to https do not work anymore in release builds for unknow reasons. The SSL cert is generated with Let's Encrypt

CodePudding user response:

Debug build and release builds are different in terms of

  1. Proguard : It enabled in release build. so if you are using reflection api or any library that may be uses reflection. like if you are using GSON library then you need to exclude your json response from proguard or add the annotation @SerlializeName("key") on Response fields. Update proguard rules for all the libraries you are using in your ProGuard configuration.

  2. BuildConfig.DEBUG : Check Is there any piece of code have some logic with BuildConfig.DEBUG check and it breaks when BuildConfig.DEBUG is false..

  • Related