2014-04-21 251 views
1

我開始地圖項目,並遵循https://developers.google.com/maps/documentation/android/start#getting_the_google_maps_android_api_v2谷歌地圖Android版V2

指令,當我添加此代碼片段,我得到一個錯誤

<?xml version="1.0" encoding="utf-8"?> 
<fragment xmlns:android="http://schemas.android.com/apk/res/android" 
     android:id="@+id/map" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:name="com.google.android.gms.maps.MapFragment"/> 

錯誤

[2014-04-21 06:32:21 - appcompat_v7_3] WARNING: unable to write jarlist cache file C:\Users\Umer Mir\workspace\appcompat_v7_3\bin\jarlist.cache 
[2014-04-21 07:14:23 - google-play-services_lib] Unable to resolve target 'android-9' 
[2014-04-21 07:14:26 - google-play-services_lib] Unable to resolve target 'android-9' 
[2014-04-21 07:45:30 - Mapsproject] Error in an XML file: aborting build. 
[2014-04-21 07:45:41 - Mapsproject] Error in an XML file: aborting build. 
+0

清單中的最低API級別是什麼? – Kedarnath

+1

[引用google-play-services庫]的可能重複(http://stackoverflow.com/questions/15902222/referencing-the-google-play-services-library) –

+1

項目--->右鍵單擊 - > Properites - > Android - >選擇Google API版本 - >確定 –

回答

0

改變你Android目標android-8爲其他。

Your Project--->Right Click-->Properites-->Android-->Select Google API 15(whatever you have)-->

或者

在Android清單文件中添加這一點。

<uses-sdk 
     android:minSdkVersion="8" 
     android:targetSdkVersion="15" /> 

你可以添加目標SDK任何你有,但它必須是Google API