Christine
Christine

Reputation: 5575

How to specify google play services dependency in maven

I build a project with maven, I want to add a dependency to Google play services wear. My Gradle build file has

compile 'com.google.android.gms:play-services-wearable:+'

and in my pom.xml under "dependencies" I put

<dependency>
  <groupId>com.google.android.gms</groupId>
  <artifactId>google-play-services</artifactId>
  <version>5</version>
  <type>aar</type>
</dependency>

but maven keeps complaining "Could not find artifact". How do I specify the dependency of google play services wear?

Upvotes: 0

Views: 799

Answers (1)

Paul Reznik
Paul Reznik

Reputation: 1015

From Google-Developers:

In versions of Google Play services prior to 6.5, you had to compile the entire package of APIs into your app. In some cases, doing so made it more difficult to keep the number of methods in your app (including framework APIs, library methods, and your own code) under the 65,536 limit.

From version 6.5, you can instead selectively compile Google Play service APIs into your app.

So, try to replace the "version" in you pom.xml to 6.5 or above

Upvotes: 1

Related Questions