6

Unfortunately after a long day searching I couldn't find anything useful for me.

My Problem is that I couldn't use "extend MapActivity" or rather import the libary. I tried to use "Google API" insted of "Android API" like recomended in some other threads but the problem is that I have no "Google API" in my SDK Manager to download or choose.

My Android SDK Manager So, I have in my "Android SDK Manager" just the Android Apis from "Android 1.5 (API 3)" to "Android 4.0.3 (API 15)" and no "Google API".

Here is an example where the "Google API" is available inside the "Android 4.0.3 (API 15)" Installing the Google APIs...

Is there any posibility to download or import the "Google API" in a different way or am I doing something wrong?

Templar
  • 5,067
  • 7
  • 34
  • 39
Yves
  • 1,152
  • 1
  • 23
  • 30
  • Go to properties of your project and then on separator Android choose Google API's for your current platform. Hope this helps you – Pedro Romão Apr 17 '13 at 16:31

3 Answers3

12

I had the same problem with a different solution, I

  1. right clicked on my project in the Package Exploere and selected "Build Path->Configure Build Path"
  2. Selected "Java Build Path" and the "Libraries" tab
  3. Selected "Add External Jar"
  4. Navigated to my sdk/add-ons/addon-google_apis_google_inc_-/libs
  5. Selected "maps.jar"

I was then able to import com.google.maps.*

user330844
  • 872
  • 1
  • 12
  • 12
3

You may want to add the "Android" tag to your question to get better help.

The "Google APIs" should be listed within 'some' of the Android API's as a subcatory on the Android SDK Manager. I just checked my SDK manager and Google Apis can be selected and installed within Android 1.6, 2.1 and 4.0

Hope this helps, if not re-download and re-install the Android SDK manager? Android SDK manager

Martin Sykes
  • 2,591
  • 1
  • 21
  • 19
  • Sorry just noticed your question update, Google does not seem to up-date and re-release there Api's for every version of Android the two projects are separate so there are big gaps between versions I can only find 1.6, 2.1 and 4.0 on mine. – Martin Sykes Mar 30 '12 at 21:28
  • 1
    Thanks for the fast answer. Finally I found a solution and fixed it with updating eclipse as recomended under http://stackoverflow.com/questions/7892220/eclipse-android-cant-install-google-apis-targets – Yves Mar 30 '12 at 21:37
0

Try adding the following to your build.gradle file:

dependencies {
    compile 'com.google.maps.android:android-maps-utils:0.3+'
}