简体   繁体   中英

google maps android v2

I start map project and follows the instruction of https://developers.google.com/maps/documentation/android/start#getting_the_google_maps_android_api_v2

when I add this code snippet i got an error

<?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"/>

Error

[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.

change your Android target android-8 to any other.

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

Or

Add this in Android manifest file.

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

you can add target SDK any which you have but it must be Google API .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM