简体   繁体   中英

Getting error "No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version')" in Android Eclipse

I am trying to run an android project using Eclipse , unfortunately, I am getting an error as "No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version')".

For fixing this I did the following

  1. try to copy "/extras/google/google_play_services/libproject/google-play-services_lib library project" but as per my understanding in the latest version of android the "google-play-services_lib" is brokedown into multiple libraries which is under "/extras/google/m2repository/com/google/android/gms".

  2. I copied "/extras/google/m2repository/com/google/android/gms" in to my eclipse workspace.

  3. Restart the eclipse and try to add "please select a library project" from project selection but it was hidden.

    please find the attachment for the errors在此处输入图片说明 在此处输入图片说明 在此处输入图片说明 在此处输入图片说明 在此处输入图片说明 在此处输入图片说明

Thanks in advance

You have two ways to resolve this error.

  1. Go to the file at google-play-services_lib/res/values/version.xml and view the raw integer for that symbol:

    < integer name="google_play_services_version">4030599 < /integer >

Replace this into AndroidManifest.xml :

<meta-data
   android:name="com.google.android.gms.version"
   android:value="4030599"/>
  1. Goto

Eclipse -> import -> existing android code -> browse -> navigate to google-play-services_lib FOLDER (android-sdk/extras/google/google_play_services/libproject).

Then in your project control click ->

properties -> android -> libraries, add -> select the project you just imported -> ok

I hope it will work for you.

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