系统:Windows 10
官方文档:https://developer.android.google.cn/studio/command-line/bundletool
1.下载bundletool,下载地址:https://github.com/google/bundletool/releases
2.配置bundletool,
@doskey bundletool=java -jar xxx\bundletool-all.jar $*
3.当 bundletool 从 app bundle 生成 APK 时,它会将这些 APK 纳入到一个名为“APK set archive”的容器中,该容器以 .apks 作为文件扩展名。如需从 app bundle 为应用支持的所有设备配置生成一组 APK,请使用 bundletool build-apks 命令,如下所示。
bundletool build-apks --bundle=/MyApp/my_app.aab --output=/MyApp/my_app.apks+
4.将 APK 部署到连接的设备
如需从 APK 集部署您的应用,请使用 install-apks 命令并使用 --apks=/path/to/apks 标记指定 APK 集的路径,如下所示。(如果连接了多个设备,请添加 --device-id=serial-id 标记来指定目标设备。)
bundletool install-apks --apks=/MyApp/my_app.apks