Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No Gradle - No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version')

I'm using Android Studio IDE and i keep getting this error after adding the google play services library. Keep in mind this is using a project that is Eclipse based and we don't have any gradle files.

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

First let me say how I added the library…

I located my android SDK folder, then find the google-play-services-jar and then i just copied it to my /libs folder. Then I went under...

File > Project Structure > Libraries > + added the google-play-services.jar

Now its listed under this, but I keep getting the above error in my manifest on line…

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

I've tried searching high and low on what to do, but nothing is working for me. Also when I go under File > Project Structure > Modules > + Module Dependency it just says there is none.

like image 923
eqiz Avatar asked Dec 09 '25 19:12

eqiz


1 Answers

The Play Services SDK is an Android library project, not a JAR, which is why the version resource is not available to you. Undo all the stuff you did above, then add the following line to the dependencies closure in your module's build.gradle file (e.g., app/build.gradle):

compile 'com.google.android.gms:play-services:7.0.0'

Or, for a faster build and smaller APK, choose more focused dependencies, for whatever bit(s) of the Play Services SDK that you need.

You can read more about this process in the documentation.


UPDATE

Apparently, somehow, this project is using the IntelliJ IDEA build system directly, which means that you will have to follow other advice for getting the Play Services SDK into IDEA. That being said, I would really recommend moving over to Gradle, as I would not count on necessarily being able to use the IDEA build system in Android Studio directly over the long haul.

like image 176
CommonsWare Avatar answered Dec 11 '25 08:12

CommonsWare