从应用程序包生成 APK 时签署信息

Signing information while generating APKs from app bundle

Android 文档指出,我们应该将签名信息传递给 "build-apks" 命令,以便将 apk 部署到设备。我没有将任何签名信息传递给 "build-apks" 命令,但我仍然能够将 apk 部署到我的设备。从日志中,我观察到 apk 是使用 android 调试密钥库自动签名的。关于 "building apks from bundle" 的 android 文档是错误的还是我的理解有误?

文档 link 和片段: https://developer.android.com/studio/command-line/bundletool

" bundletool build-apks --bundle=/MyApp/my_app.aab --output=/MyApp/my_app.apks

请注意,上面的命令创建了一组未签名的 APK。如果要将 APK 部署到设备,还需要包含应用的签名信息,如下面的命令所示。 “

注意:我使用的是 bundletool 0.9.0 版本。

这是 bundletool 0.8.0 中最近发生的变化。见release notes

好像文档还没有更新。谢谢指出,我会更新的。

欲了解更多信息,

https://issuetracker.google.com/issues/128954041

“应更新文档:在 bundletool 0.8.0 及更高版本中,build-apks 将尝试使用您的调试密钥自动对其进行签名:

有关该版本的更多信息,请参阅:https://github.com/google/bundletool/releases/tag/0.8.0