Unable to import com.google.android.maps.MapView

Unfortunately, after a long day of searching, I did not find anything useful to me.

My problem is that I could not use "extend MapActivity" or rather import libary. I tried to use the “Google API” in the “Android API” as recommended in some other threads, but the problem is that I do not have the “Google API” in my SDK manager to download or select.

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

Here is an example where the “Google API” is available in the “Android 4.0.3 (API 15)" Installing the Google API ...

Is it possible to download or import the "Google API" in a different way or am I something wrong?

+6
source share
3 answers

I had the same problem with another solution, I

  • right-clicked my project in Exploere and selected "Build Path → Configure Build Path".
  • Selected Java Build Path and Libraries Tab
  • Selected option "Add external banner"
  • Referred to my sdk / add-ons / addon-google_apis_google_inc _- / libs
  • Selected "maps.jar"

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

+12
source

You can add the “Android” tag to your question to get the best help.

The "Google APIs" must be specified in "some" Android APIs as a submap in the Android SDK Manager. I just checked my SDK manager, and Google Apis can be selected and installed in Android 1.6, 2.1 and 4.0

Hope this helps if not re-downloading and reinstalling the Android SDK manager? Android SDK manager

+3
source

Try adding the following to the build.gradle file:

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

Source: https://habr.com/ru/post/912082/


All Articles