Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 806
cooldev Avatar asked Oct 25 '18 06:10

cooldev


People also ask

How do I create an AAB file?

Generating an AAB in Android Studio To create an AAB binary locally using Android Studio, open the Build menu, then choose “Generate Signed Bundle / APK.” Follow the prompts to sign the AAB with your keystore file. For complete details, view the Android documentation.

How do I test an AAB file?

Step 1: Go to Android Studio -> Build ->Generate Signed Bundle. Select Android App Bundle on the pop screen and select Next. Step 2: Enter the KeyStore path where the KeyStore is stored or Create a new KeyStore as seen below. Step 4: Select the release mode from the list and select finish.


1 Answers

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
like image 101
Constantine Avatar answered Sep 22 '22 21:09

Constantine