简体   繁体   中英

Android error: Google play service version

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: 图书馆状况

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!

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

Google Play服务已添加为媒体库

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

Google Maps API setup, Android V2 API

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM