说明:
将 Android 应用的 .aab
文件(Android App Bundle)转换为 .apk
文件(Android Package),使用 Google 提供的工具 bundletool
。具体步骤:
1. 下载并安装 bundletool
:
本地测试使用的是 bundletool-all-1.17.0.jar,具体可在对应的链接地址里下载,如下:
对应 bundleTool 工具
对应的源码地址
https://github.com/google/bundletoolhttps://github.com/google/bundletool/releases
对应的jar包地址
https://github.com/google/bundletool/releases
2. 使用 bundletool
的jar 生成 .apks
使用以下命令将 .aab
文件生成 .apks
文件包:有两种方式,一是带签名和和不带签名的,
1. 不带签名的方式:
java -jar bundletool-all-x.x.x.jar build-apks --bundle=/path/to/your