Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/181.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android google map sdk映射设置-授权失败,请确保以下内容与API控制台中的内容相对应_Android_Macos_Google Maps_Google Play Services_Eclipse Adt - Fatal编程技术网

Android google map sdk映射设置-授权失败,请确保以下内容与API控制台中的内容相对应

Android google map sdk映射设置-授权失败,请确保以下内容与API控制台中的内容相对应,android,macos,google-maps,google-play-services,eclipse-adt,Android,Macos,Google Maps,Google Play Services,Eclipse Adt,在将一个最近的iOS项目移植到Android(运行OS X)的过程中,Android使用谷歌地图API。我在安卓系统上已经完成了这个过程,没有任何问题,在iOS安装过程中也没有任何问题。所以我不确定这里发生了什么 11-26 14:21:48.714: E/Google Maps Android API(20362): Authorization failure. Please see https://developers.google.com/maps/documentation/

在将一个最近的iOS项目移植到Android(运行OS X)的过程中,Android使用谷歌地图API。我在安卓系统上已经完成了这个过程,没有任何问题,在iOS安装过程中也没有任何问题。所以我不确定这里发生了什么

11-26 14:21:48.714: E/Google Maps Android API(20362): Authorization failure.  
Please see     https://developers.google.com/maps/documentation/android/start for how to correctly set up the map.

11-26 14:21:48.719: E/Google Maps Android API(20362): Ensure that the following correspond to what is in the API Console: 
Package Name: com.***.*****, 
API Key: ************************************, 
Certificate Fingerprint: *********************************************
以下是我所做/检查的内容:

  • 重新启动ADT/Eclipse/Mac
  • 关闭/打开设备,清除内存,卸载/重新安装应用程序
  • 亚行有一段时间失去了查看设备的能力,但现在它改变了主意,它又高兴起来了
  • 生成了一个新的密钥库,用于对应用程序进行签名
  • 使用keytool-list-v-keystore输出指纹
  • 将上述指纹放入API控制台中的谷歌地图Android API v2(已打开/启用)
无论我刷新或重新做多少事情来确保它们正确完成,应用程序仍然会抱怨指纹不匹配?日志中的指纹似乎是错的


当应用程序导出并登录到.apk文件时,会显示我认为正确的SHA1指纹。

找到了解决此问题的简单方法

尽管我用新密钥库创建的已签名的.apk拥有在API控制台中正确注册的证书。当我从Eclipse启动应用程序时,它正在使用
~/.android/
中的
debug.keystore
对应用程序进行签名。要让指纹正常工作,我需要从.apk安装应用程序,而不是从Eclipse启动

因此,如果我们重复为调试密钥库获取SHA1证书指纹的过程,就像这样:
keytool-list-v-keystore debug.keystore
,然后将该指纹添加到API控制台中,我们基本上会在彼此旁边注册dev/live指纹,无论我们是从Eclipse启动还是从.apk(或Google Play等)安装,这都无关紧要