cooldev
cooldev

Reputation: 419

Unable to generate APKs using bundletool in Android Studio

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.

Upvotes: 15

Views: 15117

Answers (2)

pablogeorge
pablogeorge

Reputation: 233

For those who are looking to generate a universal APK from the .aab file on mac, you can use the below steps

  • Use the following command to generate the '.apks' file from the '.aab' file: java -jar bundletool-all-1.1.0.jar build-apks --bundle=/path_to_aab/myapp.aab --output=/path_to_aab/myapp.apks --mode=universal

  • Rename the myapp.apks file to myapp.zip

  • Unzip and you will find universal apk

Upvotes: 2

Constantine
Constantine

Reputation: 680

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

Upvotes: 38

Related Questions