8

I want com.google.android.maps library.

I am just creating a demo for Map on android mobile but at the extends MapActivity it give error to create the class.

any downloadable link.

thanks in advance.

Siten
  • 4,515
  • 9
  • 39
  • 64

5 Answers5

12

You need to download Google Api,and set build target as that Google Api.So that you can extend map activity.

OR

you can find maps library from android-sdk-tools -> add-ons -> your api version.

Chirag
  • 56,621
  • 29
  • 151
  • 198
  • 2
    That is only method? i want downlaod Maps.jar or lib and put into may project and then i want to extends MapActivity? is this phisible? – Siten Jun 20 '11 at 11:13
  • 3
    what it mean android-sdk-tools -> add-ons -> your api version? i didn;t found it. – Siten Jun 20 '11 at 11:19
8

You can find the maps.jar in the android-sdk folder on you file system

{ANDROID-SDK_HOME}\add-ons\addon_google_apis_google_inc_8\libs

enter image description here

Mark Bakker
  • 1,278
  • 8
  • 19
1

Download jar file from following link:

http://www.java2s.com/Code/Jar/a/Downloadandroidgooglemapsapi11jar.htm

berserk
  • 2,690
  • 3
  • 32
  • 63
1

It is a bit old thread but someone might find it useful.

I had issues with Google Maps V1 and a dependency on it as suddenly dependencies in Gradle were not loading compileSdkVersion 'Google Inc.:Google APIs:23' which includes Maps V1, I switched to compileSdkVersion 23 and got bunch of compile errors similar to OPs problem with extends MapActivity. I went on to look for Jars for Maps V1 and found them hiding in:

https://dl.google.com/android/repository/addon2-1.xml

List includes bunch of pointers to various zip files eg:

...
<archives>
  <archive>
    <!-- Built on: Mon Aug 15 05:06:51 2016. -->
    <complete>
      <size>86099835</size>
      <checksum>e9999f4fa978812174dfeceec0721c793a636e5d</checksum>
      <url>google_apis-12_r01.zip</url>
    </complete>
  </archive>
</archives>
...

In order to download that zip file you need to take <url> value and add it to https://dl.google.com/android/repository/ which would end up looking like:

https://dl.google.com/android/repository/google_apis-12_r01.zip

And after you download and unzip, you will get the sources:

google_apis-12_r01
  |
  |-docs
  |-images
  |-libs
  |  |
  |  |- maps.jar
  |  \- usb.jar
  |
  |-samples
  \-manifest.ini

Afterwards just drop maps.jar to libs directory, make sure it is loaded in dependencies compile fileTree(dir: 'libs', include: ['*.jar']) and your project should compile.

Community
  • 1
  • 1
Ivar
  • 4,350
  • 2
  • 27
  • 29
0

Here you can find the downloadable maps.jar http://www.java2s.com/Code/Jar/a/Downloadandroidgooglemapsapi8jar.htm

mseo
  • 3,881
  • 3
  • 22
  • 26