Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 746
Yves Avatar asked Mar 30 '12 21:03

Yves


2 Answers

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

like image 77
user330844 Avatar answered Sep 29 '22 13:09

user330844


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

like image 32
Martin Sykes Avatar answered Sep 29 '22 11:09

Martin Sykes