1

I'm having this problem that so many devs do:

Error:No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version').

What's different about my project is the play services dependency comes from a library (that I control) which I've included as an AAR file.

Library

build.gradle: compile 'com.google.android.gms:play-services-base:10.2.1'

manifest: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />

App project

Top level build file:

repositories {
        jcenter()
        flatDir {
            dirs 'libs'
        }
    }

The AAR is in the libs directory.

Module build file: compile(name:'app-debug', ext:'aar')

That is the only dependency. I also tried it like this:

compile(name:'app-debug', ext:'aar') {
        transitive = true;
    }

but no change. That was based on this question, which is the closest I've found to my situation, but that person is including the dependency as a maven artifact: Error with google_play_services_version value from aar library

Please let me know if you need to see anything else.

nasch
  • 5,330
  • 6
  • 31
  • 52
  • Try to check these SO question [23923933](http://stackoverflow.com/questions/23923933) and [29567138](http://stackoverflow.com/questions/29567138) if it can help you. – KENdi Apr 05 '17 at 15:59
  • @KENdi Nothing relevant that I haven't tried already in those. – nasch Apr 05 '17 at 22:15

1 Answers1

0

Local aar file doesn't include dependencies of the project, so you should include all dependencies (including google location services) used by library manually to app's build.gradle file.

Orkhan Gasimli
  • 103
  • 1
  • 11