如何在不授予 Google 签名权限的情况下发布应用程序包?

How Can I Ship an App Bundle Without Giving Google Signing Authority?

在 Milena Nikolic 的 "What's New in Google Play" 作为 Google 的 #android11 发布会的一部分,她说:

As we continue to improve the App Bundle, we expect it to become a requirement for all new apps sometime in 2021.

我在文档中看到的所有内容都表明,在 Play 商店中使用 App Bundle 的唯一方法是使用他们的 Play App Signing 服务,例如:

Enroll into app Play App Signing. Otherwise, you can't upload your app bundle to the Play Console.

(来自 https://developer.android.com/guide/app-bundle

If you build and upload an Android App Bundle, you must enroll in app Play App Signing.

(来自 https://developer.android.com/studio/publish/upload-bundle

And, because app bundles defer building and signing APKs to the Google Play Store, you need to opt in to Play App Signing before you upload your app bundle.

(来自 https://developer.android.com/studio/publish/app-signing

但是,Google的文档有很多漏洞。

那么,我是否缺少一个选项,我可以通过 App Bundle 分发应用程序而无需 使用 Play App Signing?例如,也许我可以使用 bundletool 构建单个 APK 位,在本地对其进行签名,然后上传这些结果。

为了回答这个问题,我将简要解释一下 App Bundle 的工作原理。以下是要点:

  • App Bundle 只是将您所有的代码和资源打包成一个特殊格式的存档。

  • 这不是您对 apk 文件所期望的构建项目。

  • 因此,为了 Google 将其分发到 Play Store,它必须首先构建它并使用发布密钥库对其进行签名。

  • 您必须注册应用程序 Play App Signing your keystore for Google 才能签署由 App Bundle 构建的应用程序。

从以上几点可以明显看出 - 没有解决方法,我怀疑由于构建过程的物理要求和 Google 希望更多地控制将要发生的事情,我怀疑会有解决方法商店。

为什么 Google 转向这种方法。主要是因为:

  • 许多开发人员不关心应用程序大小和资源优化,因此构建变得更大更慢。

  • 更轻松的安全检查。

  • 它允许我们在我们的应用程序中使用 feature modules

所以我们只需要准备更改应用发布。

只是为了确认文档所说的内容,需要使用 Play App Signing 才能在 Google Play 上使用 App Bundle 发布。

来源:我在 Google 的 Android 团队。