1

I've this popular problem developing an android application with Eclipse:

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

So I've tried to import the google play library as specified here but I've this error:

Invalid project description.
  C:\Users\Max\workspaceAndroid\google-play-services_lib overlaps the location of another project: 'google-play-services_lib'

Infact if I try to manage the libraries of the project I get this: Libraries situation

It seems that the google play libraries are already imported and I can't add new library.

The last chance I think I've is to add manually the string

 compile 'com.google.android.gms:play-services:4.4.2@aar'

to my build.grade as specified in this answer but I don't know where find the file or if this will solve my problem.

How can I fix the error? Thanks!

Community
  • 1
  • 1
Max Markson
  • 800
  • 1
  • 19
  • 34

2 Answers2

1

Have you had the Google Play services installed already via the Google SDK Manager? It looks like the following for me:

Google Play services added as a Library

Here's what i did in the whole setup, to use the Google Maps Android V2 api

Google Maps API setup, Android V2 API

Maurice Yu
  • 71
  • 4
  • Well, I hav installed the Google's libraries via Android SDK Manager as shown in link you wrote, but in the Properties of the project I can't add a new library. Look at my image, the window on the right is what I get if I click on the Add button in the window of the left. As you can see I can't add anything. I have the same problem even if I choose Android 4.4.2 as Build Target Project – Max Markson Feb 22 '14 at 07:18
  • 1
    Did you look inside your project.properties file, and see if there are any references to the lib, android.library.reference.1=.... This should include the path to the google play services lib, and see if there's anything odd there – Maurice Yu Feb 25 '14 at 00:06
  • No, I haven't look at that file yet. Thie evening I'll check, thanks for the idea. – Max Markson Feb 25 '14 at 07:14
  • Yes! The line wasn't there...now I've put it and the error disappear! Thanks a lot – Max Markson Feb 25 '14 at 20:56
  • @MauriceYu how does that work? I'm having the same problem here. – locoboy Jan 23 '15 at 09:59
0

I had the same issue and was able to solve it by

  1. Importing the google play services as an android project in eclipse
  2. Adding reference to this imported project as a 'Lib' in

README.txt under google-play-services-lib reads like this;

Library Project including Google Play services client jar.

This can be used by an Android project to use the API's provided by Google Play services.

There is technically no source, but the src folder is necessary to ensure that the build system works. >The content is actually located in the libs/ directory.

USAGE:

Make sure you import this Android library project into your IDE and set this project as a dependency.

Note that if you use proguard, you will want to include the options from proguard.txt in your configuration.

Jerome Anthony
  • 7,823
  • 2
  • 40
  • 31