1.第一步打开终端,安装brew
2.安装bundletool
brew install bundletool
3.aab转apk
bundletool build-apks --bundle=/MyApp/my_app.aab --output=/MyApp/my_app.apks
如果下载了bundletool--xxx.jar,脚本命令前加
java -jar bundletool-all-1.5.0.jar
4.签名
bundletool build-apks --bundle=/MyApp/my_app.aab --output=/MyApp/my_app.apks
--ks=/MyApp/keystore.jks
--ks-pass=file:/MyApp/keystore.pwd
--ks-key-alias=MyKeyAlias
--key-pass=file:/MyApp/key.pwd
5.部署真机
bundletool install-apks --apks=/MyApp/my_app.apks
官方资料:https://developer.android.com/tools/bundletool?hl=zh-cn
6.签名生成工具
APK签名_ubuntu 生成app签名-CSDN博客
7.aab和apk互转
Android AAB、APK互转 - 简书