如何将 google maps v2 sdk 作为依赖项添加到 maven 项目?我正在使用 jar 文件,但项目需要资源。我怎样才能添加它们?
问问题
2773 次
2 回答
3
您应该能够使用我的 Maven Android SDK Deployer 将 Play 服务安装到本地 Maven 存储库或部署到存储库管理器,然后将 apklib 依赖项添加到包含地图内容的 Google Play 服务。
于 2013-02-23T07:41:47.877 回答
0
It looks like the Maps v2 API is part of Google Play Services. So from the SDK manager, you need to make sure it's installed (under the 'Extras' category.) Then use the maven-android-sdk-deployer (as Manfred pointed out) to install the extras/google-play-services package. 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 maps JAR I was using has the package name com.google.android.maps
but the v2 API uses com.google.android.gms.maps
于 2013-05-18T13:20:29.330 回答