How to add google maps v2 sdk to maven project as a dependency?

How to add google maps v2 sdk to maven project as a dependency? I am using a jar file, but a project resource is needed. How can I add them?

0
source share
2 answers

You can use my Maven Android Deployer SDK to install the Play Services installation on the local Maven repository or deployed to your repository manager, and then add the apklib dependency to the Google Play services that contains map data.

More details at https://github.com/mosabua/maven-android-sdk-deployer

+3
source

It seems that the map API v2 is part of Google Play Services. Therefore, from the SDK manager, you need to make sure that it is installed (in the "Advanced" category.) Then use maven-android-sdk-deployer (as Manfred pointed out) to install the additional package / google -play-services. Then use this in your POM:

<dependency> <groupId>com.google.android.gms</groupId> <artifactId>google-play-services</artifactId> <version>7</version> <type>apklib</type> </dependency> <dependency> <groupId>com.google.android.gms</groupId> <artifactId>google-play-services</artifactId> <version>7</version> <type>jar</type> </dependency> 

I noticed this when the used JAR cards had the package name com.google.android.maps , but the v2 API uses com.google.android.gms.maps

0
source

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


All Articles