我正在尝试添加一个地图到我的应用程序,但它根本不会工作…
我已经在google api控制台中启用了android maps,使用以下脚本获取了我的sha1指纹,包括调试和发布:
keytool -list -v -keystore "C:\Users\Amit\AppData\Local\Xamarin\Mono for Android\debug.keystore" -alias androiddebugkey -storepass android -keypass android和:
keytool -list -v -keystore "D:\Software Projects\xxx.keystore" -alias TasteiTClient -storepass xxx -keypass xxx使用sha1指纹识别为两者生成的密钥
将它们都添加到应用程序清单中:
<application android:label="TasteIT!" android:theme="@android:style/Theme.Light.NoTitleBar" android:icon="@drawable/appicon">
<!-- <meta-data android:name="com.google.android.maps.v2.API_KEY"
android:value="ReleaseKey"/>-->
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="DebugKey" />
</application>并将地图片段添加到布局中:
<fragment
class="com.google.android.gms.maps.MapFragment"
android:id="@+id/RestaurantsMap"
android:layout_width="match_parent"
android:layout_height="match_parent" />一旦显示了地图的布局,我仍然会遇到以下错误:
[Google Maps Android API] Failed to contact Google servers. Another attempt will be made when connectivity is established.
[Google Maps Android API] Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).有人能发现我做错了什么吗?
谢谢
阿米特
发布于 2013-09-04 14:15:50
我想这是我们的..。我的包名有大小写混合的@#!#$@!$... :)
https://stackoverflow.com/questions/18605993
复制相似问题