当我尝试调试我的项目时,我使用调试证书
收到此错误
我已经确保我的包名和SHA-1
对应于我的api密钥
这是我的AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto" package="com.example">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="15" />
<!-- Google Maps for Android v2 requires OpenGL ES v2 -->
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<!-- We need to be able to download map tiles and access Google Play Services-->
<uses-permission android:name="android.permission.INTERNET" />
<!-- Allow the application to access Google web-based services. -->
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<!-- Google Maps for Android v2 will cache map tiles on external storage -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- Google Maps for Android v2 needs this permission so that it may check the connection state as it must download data -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- Permission to receive remote notifications from Google Play Services -->
<!-- Notice here that we have the package name of our application as a prefix on the permissions. -->
<uses-permission android:name="com.example.permission.MAPS_RECEIVE" />
<permission android:name="com.example.permission.MAPS_RECEIVE" android:protectionLevel="signature" />
<!-- These are optional, but recommended. They will allow Maps to use the My Location provider. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application android:label="map" android:icon="@drawable/Icon">
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="map_key" />
</application>
</manifest>
这是我的API密钥
这是我的SHA-1证书
我使用eclipse获得了SHA-1
顺便说一句,我使用真实设备来调试我的项目,c#,visual studio 2012和xamarin.android。它只显示带有谷歌徽标和放大和缩小按钮的白色屏幕。我的调试证书出了什么问题?
答案 0 :(得分:1)
如果密钥是新的(刚刚在Google API控制台中创建),则需要一段时间才能将其用于Google地图。
不要担心一切都被宣布为好,只需要一些时间。
编辑:通过日志中写的内容,您必须为调试密钥库添加指纹:D9595 ..
只需在Google API控制台中使用该指纹添加新行。您的调试密钥库位于C:\ Users \ .android \ debug.keystore,默认密码为:android