9

I have update SDK using SDK manger,after updating SDK "google-play-services_lib" not getting complied,Its showing following error.

**extras\google\google_play_services\libproject\google-play-services_lib\res\values-v11\appinvite_styles.xml:5: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Holo.Light.DialogWhenLarge.NoActionBar'.

extras\google\google_play_services\libproject\google-play-services_lib\res\values-v21\appinvite_styles.xml:5: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Material.Light.DialogWhenLarge.NoActionBar'.

 extras\google\google_play_services\libproject\google-play-services_lib\res\values-v11\appinvite_styles.xml:5: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Holo.Light.DialogWhenLarge.NoActionBar'.

 extras\google\google_play_services\libproject\google-play-services_lib\res\values-v21\appinvite_styles.xml:5: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Material.Light.DialogWhenLarge.NoActionBar'.**

Any Help appreciated.

Following is xml(under "values-v11") which is giving error,

<?xml version="1.0" encoding="utf-8"?>

<!-- Base preview application theme. -->
<style name="Theme.AppInvite.Preview.Base" parent="@android:style/Theme.Holo.Light.DialogWhenLarge.NoActionBar"/>

Joe
  • 550
  • 2
  • 11
  • 21
  • As per my understanding your project(s) are not getting. [I think it will help you](http://stackoverflow.com/questions/21059612/no-resource-found-that-matches-the-given-name-style-theme-appcompat-light) – Singha Jan 06 '16 at 11:17
  • are you using eclipse or android studio. ? – Bharatesh Jan 06 '16 at 11:23
  • I had exact same problem. This answer helped me: http://stackoverflow.com/a/34451936/1626106 – LoveForDroid Feb 09 '16 at 21:58

5 Answers5

19

This may fix your problem

  1. Right side click on your project select Properties -> Select Android
  2. Under Project Build Target, check *Android 6.0 or to the latest API.
  3. Build

One important thing : While importing library projects always copy to your workspace.

UPDATED:
Reason : Most of time google play service lib access resources from lastest API available. that's why you need to target to the latest.

Bharatesh
  • 8,943
  • 3
  • 38
  • 67
  • Thanks Bharat ,I tried what you mentioned in your answer still not working.. I am having issue in "google-play-services_lib"(library) after updating SDK..its library problem but unfortunately I could not figure out fix. – Joe Jan 06 '16 at 12:33
  • Ok then do this select Android 6.0. if 6.0 SDK is not there install the same. then clean and build the project. – Bharatesh Jan 06 '16 at 12:41
  • its working after changing android 6.0..Could you please explain what went wrong after taking SDK update and why its working after changing android version library and project to 6.0....Thanks – Joe Jan 06 '16 at 13:08
  • I have mentioned in the answer as it may help others. – Bharatesh Jan 06 '16 at 13:12
1

This is the solution it worked for me (after a few hours):

1) Unistall the Google Play Services Lib from "Android SDK Manager". It will ask you if you want to delete also the directory in your workspace. Answer "Yes"

2) Download again the Google Play Library from the "Android SDK Manager" and follow the steps to import it to your workspace

3) Set Android Target for google-play-services-lib for 5.0.1 (these are the versions for me worked)

4) In the project you want to import, right click->properties->Android . Add again the google-play-services-lib library.

5) Set Android Target for your project to 5.0.1 (the same case that point 3: I guess it can work for other versions)

6) Only in case the above solution will not work, copy the android-support-v4.jar from <...>/sdk/extras/android/support/v4 to the "libs" folder of your project.

I hope it works for you

TonyL
  • 115
  • 8
1

For the new Google Play Services, you need change the project target in the project.properties file (The Google Play Services Lib project, not your project):

In the below file:

google-play-services_lib/project.properties

Change the below line

target=**android-9*

to:

target=**android-23**
Shridutt Kothari
  • 7,326
  • 3
  • 41
  • 61
0

Tried to compile your project with the android target-sdk-version="21". It worked for me.

Akshay
  • 6,029
  • 7
  • 40
  • 59
  • Thanks for reply,I am adding "google-play-services_lib" to my project library it self is not compiling..how can I compile my project.Its problem with library. – Joe Jan 06 '16 at 11:42
  • @Joe is possible to attach screenshot of your setup – Akshay Jan 06 '16 at 11:51
0

I fixed it by changing the minSdkVersion in google-play-services_lib manifest to the minimum SDK version used by my app. Example: <uses-sdk android:minSdkVersion="14"/>

Aspiring Dev
  • 505
  • 1
  • 4
  • 17