简体   繁体   English

谷歌地图适用于 Android Release APK 但不适用于 AAB

[英]Google Maps work with Android Release APK but not AAB

I have an app developed with Xamarin.Android and I recently added a map to it.我有一个用 Xamarin.Android 开发的应用程序,我最近向它添加了一个 map。 I created my Key in the Developer console and restricted it with my fingerprints for Debug and Release.我在开发人员控制台中创建了我的密钥,并使用我的指纹对其进行了限制以进行调试和发布。 In Debug the map works fine.在调试中,map 工作正常。

If I build an APK of the Release app and sign it (with the certificate I used to get the fingerprint) and deploy the app to my phone then the map works fine.如果我构建 Release 应用程序的 APK 并对其进行签名(使用我用来获取指纹的证书)并将该应用程序部署到我的手机上,那么 map 可以正常工作。

If I build an AAB (AppBundle) and sign it with the same certificate and publish the app on the Play Store and download the app on my phone I get the blank screen that only says Google and has the zoom buttons.如果我构建一个 AAB (AppBundle) 并使用相同的证书对其进行签名,然后在 Play 商店上发布该应用程序并在我的手机上下载该应用程序,我会得到一个空白屏幕,其中只显示 Google 并具有缩放按钮。

Of course Google now wants you to upload the AAB, not the APK but I can't get the map to work.当然,Google 现在希望您上传 AAB,而不是 APK,但我无法让 map 正常工作。 This is the same app, same code, same certificate, testing on the same phone only difference is when building selecting apk or bundle.这是相同的应用程序,相同的代码,相同的证书,在同一部手机上进行测试,唯一的区别是在构建时选择 apk 或 bundle。

Anyone encountered this problem?有人遇到过这个问题吗?

The issue is that the documentation https://docs.expo.io/versions/latest/sdk/map-view/#deploying-to-a-standalone-app-on-android mentions that you have to get the Google Certificate Fingerprint by running a command in the pc, but the truth is, that certificate you have to obtain it from the developer play store page of your application.问题是文档https://docs.expo.io/versions/latest/sdk/map-view/#deploying-to-a-standalone-app-on-android提到您必须获得 Google 证书指纹通过在 pc 中运行命令,但事实是,您必须从应用程序的开发人员播放商店页面获取该证书。

and you could see :你可以看到:

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.如果您启用了 Google Play 的应用签名服务,您将需要在生产中获取他们的应用签名证书,而不是 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.您可以通过从 Play 管理中心 -> 您的应用程序 -> 发布管理 -> 应用程序签名获取签名,然后转到 API 仪表板 -> 凭据并将签名添加到现有凭据来执行此操作。

For any newer users, the app signing key certificate is now saved on Google Play Console > Setup > App integrity > App Signing对于任何新用户,应用签名密钥证书现在保存在 Google Play 控制台 > 设置 > 应用完整性 > 应用签名

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM