Unable to generate APKs using bundletool in Android Studio

cooldev picture cooldev · Oct 25, 2018 · Viewed 7k times · Source

As mentioned in Bundletool Documentation

I'm giving following command on Android Studio terminal:

bundletool build-apks --bundle=/MyApp/my_app.aab --output=/MyApp/my_app.apks

I'm getting following error:

'bundletool' is not recognized as an internal or external command,
operable program or batch file.

I've downloaded the bundletool 0.6.0 jar

On bundletool github, there are no steps given to install it on windows.

Answer

Constantine picture Constantine · Oct 29, 2018

Execute bundletool from the command line as follows. Make sure paths to java/bundletool/aab/jks are set and correct.

java -jar bundletool-all-0.6.0.jar build-apks --bundle=/MyApp/my_app.aab --output=/MyApp/my_app.apks --ks=keystore.jks --ks-key-alias=key0