I get "Error: a resource was not found that matches the specified name (by value with the value @ integer / google_play_services_version)"

I am developing an application on the Ionic Framework / cordova, and when I try to run "android", I get the following:

"Error: the resource was not found that matches the specified name (by value with value @ integer / google_play_services_version)"

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

Thanks in advance!

+42
android google-play-services cordova ionic-framework
May 29 '14 at
source share
7 answers

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

Click File> Import, select Android> Existing Android Code in the Workspace , and view the workspace project for the library project.

Right click on your Android project. Go to properties. Select Android in the left pane. Click "Add" and view the library project. Choose the same. Click "OK" and apply.

enter image description here

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

+18
May 29 '14 at 12:33
source share

For those who are facing this problem with Android Studio and / or Gradle, you just need to make sure that you have the correct dependency in your evaluation file. Again, DO NOT encode this value to version.xml ..

Gradle for example.

dependencies { compile 'com.android.support:appcompat-v7:22.0.0' compile 'com.google.android.gms:play-services-gcm:7.5.0' } 
+18
Jun 11 '15 at 1:00
source share

Install and configure the Google Play Services SDK. You do not need to hard code this value.

  • Add Google Play services as an Android library project.

I found that the game services libproject should be imported to the same physical drive as your project. (check the box "Copy projects to workspace" upon import)

+11
May 29 '14 at
source share

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 
+10
Jun 13 '15 at 8:36
source share

You need to add a game services library to your project. This does not work jus, adding an external jar. You need to import the play_services_lib project into the workspace. And then add this library to the project by selecting

Your project β†’ Properties β†’ Android β†’ Library

Check out this link for a detailed explanation of how to import play_services_lib into your workspace.

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

After that, the error will disappear and you do not need to add a fixed value.

+6
May 29 '14 at 6:51
source share

For those who are facing this issue with Android Studio / Gradle, you just need to make sure that you have the correct dependency in your evaluation file.

  • You need to set up Google Play services - https://developers.google.com/android/guides/setup (1. Debit configuration of Google Play Services)

  • If you have already completed the previous step, then (si ya completaste ese paso entonces) ... Let's say that you have this Gradle: (suponiendo que ya tienes un archivo Gradle asi :)

    dependencies {compile fileTree (dir: 'libs, include: [' * .jar]) compile 'com.google.android.gms: play-services-gcm: 7.5.0}

you need to add one line for Gradle to enable the Google Play Services library (solo necesitas agregar un solo renglon para que Gradle incluya la libreria from the Google Play Services library)

dependencies {compile fileTree (dir: 'libs, include: [' * .jar]) compile 'com.android.support:appcompat-v7:21.0.3 compile' com.google.android.gms: play-services-gcm: 7.5.0}

It is bad practice to hard code this value in version.xml (for example, if you don’t know

+4
Oct 22 '15 at 7:06
source share

For anyone who has this problem when creating in Unity3D:

1. Assets/PlayServicesResolver/AndroidResolver/ResolveClientJars

2. Build again

Today it is fixed for me.

 stderr[ AndroidManifest.xml:19: error: Error: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version'). ] 
+1
Jul 20 '17 at 9:44 on
source share



All Articles