can't import com.google.android.maps.MapView

19,184

Solution 1

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

Solution 2

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

Share:
19,184
Yves
Author by

Yves

I code for money but also for fun.

Updated on July 12, 2022

Comments

  • Yves
    Yves almost 2 years

    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?

  • Martin Sykes
    Martin Sykes about 12 years
    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.
  • Yves
    Yves about 12 years
    Thanks for the fast answer. Finally I found a solution and fixed it with updating eclipse as recomended under stackoverflow.com/questions/7892220/…