最新的GoogleMap v2 安裝方法

http://wangshifuola.blogspot.tw/2013/01/androidgoogle-maps-android-api-v2.html

 

Q1:

有一個重點

如果你也在5 - c 出錯

請在import google-play-services_lib 的時候 要把Copy project into workspace 打勾......

我卡很久....

Q2:

如果編譯出錯出現

Caused by: android.view.InflateException: Binary XML file line #3: Error inflating class fragment

表示你沒有匯入android.support.v4.app 或是把minSDK設為15或以上

參考1

參考二

或是在根目錄新增libs資料夾

再把jar丟進去 他就會自動參考了

然後在properties>java Build Path>Order and Export 內將Android Private Libraries移到最上面

還要注意以下權限要放對位置(放在application標籤底下)

<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="your key"/>


arrow
arrow

    cookiesp 發表在 痞客邦 留言(0) 人氣()