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

74,990

Solution 1

Copy the google-play services_lib library project to your workspace OR Import the library project to your eclipse.

Click File > Import, select Android > Existing Android Code into Workspace, and browse the workspace import the library project.

Right click on your android project. Goto properties. Choose Android on the left panel. Click on Add and browse the library project. Select the same. Click ok and apply.

enter image description here

checkout this link for reference. http://developer.android.com/tools/projects/projects-eclipse.html#ReferencingLibraryProject

Solution 2

For anyone encountering this issue using Android Studio and/or Gradle, you just need to make sure that you have the right dependency in your grade file. Again, do NOT hardcode this value into a versions.xml file..

Gradle eg.

dependencies {
    compile 'com.android.support:appcompat-v7:22.0.0'
    compile 'com.google.android.gms:play-services-gcm:7.5.0'
}

Solution 3

Install and configure the Google Play services SDK properly. You don't need to hard code that value.

  • Add Google Play services as an Android library project.

I have found that the play services libproject has to be imported onto the same physical drive as your project. (check the 'Copy projects into workspace' checkbox when you import)

Solution 4

I solved the problem by copying the version.xml file from google play service lib.

google-play-services_lib/res/values/version.xml 

to my project

MyApp/res/values/version.xml

Solution 5

You need to add the play services library to your project. This doesn't work by jus adding an external jar. You need to import the play_services_lib project into your workspace. And then add this library to you project by going to

Your Project -> Properties -> Android -> Library

Checkout this link for detailed explanation on how to import the play_services_lib into your workspace

http://developer.android.com/google/play-services/setup.html

After this the error will vanish and you need not add any fixed value.

Share:
74,990

Related videos on Youtube

Juan Manuel Masud
Author by

Juan Manuel Masud

Years of experience in Frontend, layout, and everything related to UI. Self-taught in extreme, and always looking and learning for new technologies. I really love what I do, and that's a big plus. I'm also a traveler, I had the chance to travel around 30 countries around the globe, in the 5 continents. I lived one year in New Zealand, and it was an amazing experience, both personally and occupationally as well.

Updated on March 16, 2020

Comments

  • Juan Manuel Masud
    Juan Manuel Masud about 4 years

    I'm developing an app on Ionic Framework/cordova, and when I try "cordova run android" I get this:

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

    I don't really know what is happening, I tried to set the value with a fixed value (I know is not the best solution), and the problem continues.

    Thanks in advance!

  • CthulhuJon
    CthulhuJon over 9 years
    how do you do that if you are using Unity3d ?
  • Dane411
    Dane411 about 9 years
    what if there is already but you still are getting the error message?
  • Gene Bo
    Gene Bo about 9 years
    After you have downloaded the SDK, you can add it as project from here: [AndroidSdk_Home]/extras/google/google_play_services/libproj‌​ect/google-play-serv‌​ices_lib .. thanks to: stackoverflow.com/a/17611095/2162226
  • Navneeth
    Navneeth about 9 years
    sorry for late reply, may be you didn't link google play library with your project properly. checkout this link developer.android.com/tools/projects/…
  • kev
    kev about 9 years
    adding the play services libproject to the same physical drive worked for me.
  • Rajendra Khabiya
    Rajendra Khabiya almost 9 years
    Helped me too... Thanks !
  • crispydc
    crispydc over 8 years
    Building on this answer, you can get Cordova to add this Gradle dependency for you during the build by adding a framework element to your plugin.xml file: <framework src="com.google.android.gms:play-services-gcm:7.5.0" />. I'm using Cordova version 5.1.1 and cordova-android version 4.0.2.
  • Stoycho Andreev
    Stoycho Andreev over 8 years
    this answer is a little bit wrong because when google update it's support library they will update the value of @integer/google_play_services_version and you will have problems in you application. It can be fixed with this answer very easy but fix is temporally
  • Mauricio Gracia Gutierrez
    Mauricio Gracia Gutierrez over 8 years