4
votes

This is the error I am trying to fix:

Description: error: Error: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version'). Resource: AndroidManifest.xml Location: line 75 Type: Android AAPT Problem

enter image description here

I am trying to implement the solution I see at https://developers.google.com/android/guides/setup#add_google_play_services_to_your_project, under "Add Google Play Services to Your Project", in the "OTHER" tab. I have already fixed this error in Android Studio by using the following line in the dependencies {} section of my app/build.grandle file:

compile 'com.google.android.gms:play-services:9.0.2'

However, for special circumstances, I need to implement the same fix in Eclipse ADT this time. Using the Eclipse Android SDK Manager, I already installed Google Play services, revision 39:

enter image description here

I can confirm it was installed on my computer at C:\Users\jaimemontoya\android-sdks\extras\google\google_play_services:

enter image description here

In the instructions at https://developers.google.com/android/guides/setup#add_google_play_services_to_your_project, it says: "Copy the library project at /extras/google/google_play_services/libproject/google-play-services_lib/ to the location where you maintain your Android app projects."

As you can see in the image above, I do not have the /extras/google/google_play_services/libproject/google-play-services_lib/ folder in my Google Play services, revision 39 installation. Any ideas?

2
Google stopped supporting ADT a while back. Part of that is no longer shipping Play Services as a regular library project (and I'm not sure that it would work anyway). I am not aware of a reliable current recipe for using Play Services or other arbitrary libraries with Eclipse+ADT. I encourage you to revisit the "special circumstances" and migrate this project to a currently-maintained build system (e.g., Gradle).CommonsWare
By "migrate this project to a currently-maintained build system (e.g., Gradle)", do you mean Android Studio, or Eclipse with the Grandle build system? I already fixed this error in Android Studio but as I mentioned, for special circumstances, I need to implement the same fix in Eclipse now.Jaime Montoya
I do not know if there is a stable Eclipse environment that supports Gradle and the Android Plugin for Gradle. Eclipse's Andmore initiative should eventually fill this gap, but I do not know its status. Also, there may be Eclipse recipes for using Maven as a build system that can accommodate AARs.CommonsWare

2 Answers

9
votes

I implemented the solution that Andrew S provided at Missing "<sdk>/extras/google/google_play_services/libproject" folder after update to revision 30. First, I downloaded https://dl-ssl.google.com/android/repository/google_play_services_8298000_r28.zip. That means that instead of the Google Play services, revision 39 that I was trying to use, I went to the older revision 28.

I extracted the file and placed it at C:\Users\jaimemontoya\android-sdks\extras\google\google-play-services:

enter image description here

From Eclipse I used File > Import... > Android > Existing Android Code Into Workspace > Root Directory: C:\Users\jaimemontoya\android-sdks\extras\google\google-play-services\libproject\google-play-services_lib

I confirmed everything looked correct:

Project to import: C:\Users\jaimemontoya\android-sdks\extras\google\google-play-services\libproject\google-play-services_lib New Project Name: google-play-services_lib

Then from the Eclipse Package Explorer I right-clicked my project, went to Properties, after that clicked Android and finally after scrolling down I used the "Add..." button to add the google-play-services_lib library. It will appeared as one of the added libraries:

enter image description here

The error is fixed for me now:

enter image description here

1
votes

You can also use the latest versions of GPS with Eclipse ADT. With version 68 of the Google Repository downloaded via SDK Manager from Studio, navigate to $ANDROID_SDK_ROOT/extras/google/m2repository/com/google/android/gms. For each service needed, go to subdirectory #PLAY_SERVICE_NEEDED#/$VERSION and extract the contained AAR file (which is just a zip file). Within the AAR, you will find classes.jar, a manifest and res(sources) from which you can make an ADT compatible library project.