How to generate full APK file including dynamic feature module

后端 未结 3 1785
一生所求
一生所求 2020-12-09 10:57

My project has dynamic feature module and I would like to generate debug or release APK including the dynamic feature. Currently I can get only base APK file.

Basica

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-09 11:53

    Download bundletool jar file from Github (Latest release > Assets > bundletool-all-version.jar file). Rename that file to bundletool.jar

    1. Generate your aab file from Android Studio eg: myapp-release.aab
    2. Run following command:

    java -jar "path/to/bundletool.jar" build-apks --bundle=myapp-release.aab --output=myapp.apks --ks="/path/to/myapp-release.keystore" --ks-pass=pass:myapp-keystore-pass --ks-key-alias=myapp-alias --key-pass=pass:myapp-alias-pass

    1. myapp.apks file will be generated
    2. below is the command to generate the universal apk

    java -jar bundletool.jar build-apks --bundle=nhl.aab --output=nhl.apks --mode=universal

    `

提交回复
热议问题