相关疑难解决方法(0)

Google Maps Android API:授权失败。确保已启用“Google Maps Android API v2”。确保以下 Android Key 存在

我收到此错误:

E/Google Maps Android API: Authorization failure.  Please see https://developers.google.com/maps/documentation/android-api/start for how to correctly set up the map.
E/Google Maps Android API: In the Google Developer Console (https://console.developers.google.com)
Ensure that the "Google Maps Android API v2" is enabled.
Ensure that the following Android Key exists:
    API Key: [The key...]
    Android Application (<cert_fingerprint>;<package_name>):
Run Code Online (Sandbox Code Playgroud)

这就是我所看到的,而不是地图正常工作:

在此处输入图片说明

在我的app/build.gradle,我有这个:

implementation 'com.google.android.gms:play-services-base:16.1.0'
implementation 'com.google.android.gms:play-services-analytics:16.0.8'
implementation 'com.google.android.gms:play-services-awareness:16.0.0'
implementation 'com.google.android.gms:play-services-cast:16.2.0'
implementation 'com.google.android.gms:play-services-gcm:16.1.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
Run Code Online (Sandbox Code Playgroud)

play-services-location是我需要的谷歌地图,对吗?我正在查看https://developers.google.com/android/guides/setup上的列表,我认为这Google Location and Activity Recognition - com.google.android.gms:play-services-location:16.0.0就是 …

google-maps google-maps-api-3 google-play-services google-maps-android-api-2 google-maps-android-api-1

5
推荐指数
1
解决办法
5096
查看次数