AppGallery 上发布的应用 Google 地图加载失败的案例研究解决方案

Case Study Solutions to Google Maps Loading Failure for an App Released on AppGallery

我在华为应用市场发布应用后,应用无法加载Google 地图。但是,在 Google Play 商店发布的同一个应用程序中没有出现该问题。

华为不再拥有使用Google服务的许可。这意味着您不能直接通过应用程序使用 Google 服务。

您可以使用 Googles API 服务:

https://developers.google.com/maps/web-services/client-library?hl=de

或者您可以使用例如开放街图:

https://www.openstreetmap.de/

(德服,很给力)

Google 已限制 Google 移动服务 (GMS),即 Google Play 服务,只能在 2019 年 5 月之后发布的更新型号的华为 phone 上使用. 那些 phone 型号没有安装 GMS。 GMS 服务是服务包名称,大多数以 com.google.android.gms 开头,包括地图。新 Google Map SDK 3.1 beta 版本包以 com.google.android.libraries.maps 开头。但是,它仍然稍微依赖于 com.google.android.gms GMS 软件包。

Google 还会检查 phone 模型是否已获得 Google Play 商店的授权 phone 模型。过去 2 年华为 phone 型号不在授权型号列表中,无法直接从 Google Play 商店安装应用。

如果您在 Google App Store 上发布了一个应用程序并正确加载了 Google 地图,但不是在华为 AppGallery 上发布的版本,问题可能来自 Google GMS 限制。

建议您的应用从使用GMS Google Map SDK 切换到Huawei HMS Maps Kit 或第三方地图SDK。