我已經下載了谷歌API和現在有什麼似乎是我的地圖XML的標準問題是隻顯示一個灰色握在谷歌地圖應顯示,如下所示:沒有地圖顯示上MapActivity
我已經嘗試了兩個API密鑰(通過生成一個新的)無濟於事。我已經加入了互聯網許可,谷歌在我的清單映射庫,如下所示:
清單:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.map"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".MainMap"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<uses-library android:name="com.google.android.maps" />
</application>
</manifest>
API密鑰:
這是我的地圖XML佈局:
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.maps.MapView
android:id="@+id/mapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="AIzaSyBV_Zio-pysGWfjGo7dUpGvYRZ9PB3NQLc"/>
</RelativeLayout>
我將我的項目設置爲Google API的SDK版本,與我的AVD一樣。
當我的應用程序加載和我的意圖開始,我得到的錯誤在我的控制檯:
02-16 15:55:04.637: E/MapActivity(305): Couldn't get connection factory client
閱讀[this](http://samir-mangroliya.blogspot.in/p/android-map-api-key.html)並生成API key [here](https://developers.google。 – 2013-02-16 16:19:43
XML應用程序不能在應用程序的XML中使用 – JustinDanielson 2013-02-16 16:34:12
您試圖做的這些方法在2012年12月被折舊:請閱讀[this文件(https://developers.google.com/maps/documentation/android/v1/)。即使您使用新的Google Maps API v2,也無法在模擬器中部署您的應用程序:請參閱[本文檔](http://developer.android.com/intl/ko/google/play-services/setup。 html) – BBonDoo 2013-02-23 02:08:07