Google 地图适用于 Android 发布 APK 但不适用于 AAB
Google Maps work with Android Release APK but not AAB
我有一个用 Xamarin.Android 开发的应用程序,我最近向它添加了一张地图。我在开发人员控制台中创建了我的密钥,并使用我的指纹对其进行了限制以进行调试和发布。在调试中地图工作正常。
如果我构建 Release 应用程序的 APK 并对其签名(使用我用来获取指纹的证书)并将该应用程序部署到我的 phone 那么地图就可以正常工作。
如果我构建一个 AAB (AppBundle) 并使用相同的证书对其进行签名,然后在 Play 商店上发布该应用程序并在我的 phone 上下载该应用程序,我得到的空白屏幕仅显示 Google 并且有缩放按钮。
当然 Google 现在希望您上传 AAB,而不是 APK,但我无法使地图正常工作。这是相同的应用程序、相同的代码、相同的证书、相同的测试 phone 唯一的区别是在构建时选择 apk 或 bundle。
有人遇到过这个问题吗?
问题是文档 https://docs.expo.io/versions/latest/sdk/map-view/#deploying-to-a-standalone-app-on-android 提到您必须通过 运行 PC 中的命令获取 Google 证书指纹,但事实是,证书您必须从您的应用程序的开发者 Play 商店页面获取它。
你可以看到:
If you've enabled Google Play's app signing service, you will need to
grab their app signing certificate in production rather than the
upload certificate returned by expo fetch:android:hashes. You can do
this by grabbing the signature from Play Console -> Your App ->
Release management -> App signing, and then going to the API Dashboard
-> Credentials and adding the signature to your existing credential.
对于任何新用户,应用签名密钥证书现在保存在 Google Play 控制台 > 设置 > 应用完整性 > 应用签名
我有一个用 Xamarin.Android 开发的应用程序,我最近向它添加了一张地图。我在开发人员控制台中创建了我的密钥,并使用我的指纹对其进行了限制以进行调试和发布。在调试中地图工作正常。
如果我构建 Release 应用程序的 APK 并对其签名(使用我用来获取指纹的证书)并将该应用程序部署到我的 phone 那么地图就可以正常工作。
如果我构建一个 AAB (AppBundle) 并使用相同的证书对其进行签名,然后在 Play 商店上发布该应用程序并在我的 phone 上下载该应用程序,我得到的空白屏幕仅显示 Google 并且有缩放按钮。
当然 Google 现在希望您上传 AAB,而不是 APK,但我无法使地图正常工作。这是相同的应用程序、相同的代码、相同的证书、相同的测试 phone 唯一的区别是在构建时选择 apk 或 bundle。
有人遇到过这个问题吗?
问题是文档 https://docs.expo.io/versions/latest/sdk/map-view/#deploying-to-a-standalone-app-on-android 提到您必须通过 运行 PC 中的命令获取 Google 证书指纹,但事实是,证书您必须从您的应用程序的开发者 Play 商店页面获取它。
你可以看到:
If you've enabled Google Play's app signing service, you will need to grab their app signing certificate in production rather than the upload certificate returned by expo fetch:android:hashes. You can do this by grabbing the signature from Play Console -> Your App -> Release management -> App signing, and then going to the API Dashboard -> Credentials and adding the signature to your existing credential.
对于任何新用户,应用签名密钥证书现在保存在 Google Play 控制台 > 设置 > 应用完整性 > 应用签名