0

My app is already in the Playstore. I want to add a dynamic feature to it.

Whenever I try to test and see if it works with internal tests, it gives me error -2 and says that it can't find the feature's module. Which is weird because the bundle I uploaded has it. Could this be because when it tries to download it, it gets confused by the app that's already in the playstore (Which does not have the module)?

Edric
  • 24,639
  • 13
  • 81
  • 91
DaPoox
  • 139
  • 4
  • 16
  • Can you help me with this? https://stackoverflow.com/questions/64191100/using-dynamic-feature-module-fonts-downloaded-and-installed-in-asset-folder-but – jazzbpn Oct 04 '20 at 13:58

2 Answers2

1

Clarification : As it is said, in this case we are uploading a bundle file to the playstore not an apk.

RedHac
  • 31
  • 4
0

Are you generating an apk which has your feature module included into it. you can try using bundle-tool and use its mode --mode=universal to generate an apk which will include your all feature modules.

Also if you want to test your dynamic modules locally you can use its --local-testing flag.

Here are the steps:

./gradlew bundleDebug

bundletool build-apks --bundle=./app/build/outputs/bundle/internalDebug/app-internal-debug.aab --output=./app/build/outputs/apks/universalapk.apks --mode=universal

To extract an apk out of it..you can rename universalapk.apks to universalapk.zip and open it. you will get the apk

or to install it, you can use:

bundletool install-apks --apks ./app/build/outputs/apks/universalapk.apks

Refer to this link: for generating apk with feature modules: Generate Apk file from aab file (android app bundle)

Amritpal Singh
  • 984
  • 2
  • 14
  • 33