如何才能在我的Android應用程序導入該包(庫)如何導入這個包(庫)在我的Android應用程序com.google.android.gms.maps.GoogleMap
com.google.android.gms.maps.GoogleMap;
當我添加這在我的應用程序,它會顯示爲錯誤
但這種進口是成功的
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import android.os.Bundle;
import android.view.Menu;
我使用Eclipse的開普勒, 編譯SDK API谷歌API(谷歌公司)API 19 最低API等級14 已經加入谷歌的API [安卓[4.4] maps.jar 我使用谷歌地圖的Android APIv2 在清單文件中聲明的所有權限如下
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<permission
android:name="com.example.googlenewmap.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission
android:name = "com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="com.example.googlenewmap.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
,並添加MapAPI重點從https://code.google.com/apis/console 獲取和添加到我的佈局文件遵循
<com.google.android.maps.MapView
android:id="@+id/mapView"
android:layout_width="match_parent
android:layout_height="match_parent"
android:clickable="true"
android:enabled="true"
android:apiKey = "I have My APIKey here" />
我只得到我的模擬器作爲輸出和控制檯網格顯示此錯誤 4月11日至28日:04:57.535:E/MapActivity(1555):無法獲得連接到ction廠客戶
我無法理解這樣的錯誤「怎麼我在Android的,所以請人新的全部意義幫我在這裏。 thankx提前
你應該從這個問題 – gian1200