views:

56

answers:

1

dear friends,

i am trying to display google map on Android refering to this tutorial http://developer.android.com/resources/tutorials/views/hello-mapview.html when i go to google website to download addon it says addons are not available kindly guide what should i do to achieve this??

+3  A: 

If you read the Add-on page more carefully you'll see this:

The Google APIs add-on is not yet available for download. For your convenience, the Google APIs add-on is available preinstalled in the Android SDK.

So you should already have the Google APIs add-on already if you've installed the Android SDK.

To check, run the android command with no options at a command prompt to open the Android SDK and AVD Manager GUI. Check Installed Packages to confirm that Google APIs is listed:

alt text

If it's not listed use the Available Packages option to install it.

If you're using Eclipse, you also need to edit the Properties of your Project and select the correct Build Target:

alt text

Dave Webb
ok thanks for reply could you please guide one more thing there are several related to google which to choose for example i can see in the list google api by google inc , android api3, revision 3 ,google api by google inc , android api4 revision 2, google api by google inc android api5 revision 1 ,google api by google inc android api6 revision 1,google api by google inc android api7 revision 1
UMMA
You'll need to use the one which matches the level for your application. Or more specifically, the one which matches the `android:minSdkVersion` attribute in your `AndroidManifest.xml` file.
Dave Webb
ok thanks for reply in minsdkversion written 6 and i have downloaded 7 is there any problem if i use this one???
UMMA
Yes, this will be a problem. minSdkVersion = 6 means your application is supported on Android 2.0.1 and above; the Google APIs you've downloaded are only supported on 2.1 and above.
Dave Webb
i have installed google apis by google inc. android api 7,revision 1and restarted eclipse but still i am getting error on importing name spaceimport com.google.android.maps.MapActivity;
UMMA
let me try doing api6 revision 1
UMMA
STill no hope... i cannot get com.google it is still giving me error any other solution or something i might be missing could you please guide me??
UMMA
The Documents also says that you need to update your **Build Target**. Have you done this? I've added this to the answer above.
Dave Webb
when i saw that option it was already selected.....but still not able to access that com.google and its inner classes.. :(
UMMA
finally its working now thanks for support dave a restart of eclipse was required to do this..
UMMA