I want to get library for com.google.android.maps to add my project
I want com.google.android.maps library.
I am just creating a demo for Map on android mobi开发者_如何学Cle but at the extends MapActivity
it give error to create the class.
any downloadable link.
thanks in advance.
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.
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
Download jar file from following link:
http://www.java2s.com/Code/Jar/a/Downloadandroidgooglemapsapi11jar.htm
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.
Here you can find the downloadable maps.jar http://www.java2s.com/Code/Jar/a/Downloadandroidgooglemapsapi8jar.htm
精彩评论