I have updated the my android SDK to android 5.0 with android support lib version to 21
when I try to add support v7 lib to my project it's showing following error in the appcompact-v7 lib project. before updating the Android SDK it's works fine.
appcompat_v7/res/values-large-v14/themes_base.xml:19: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Base.AppCompat.DialogWhenLarge.Base'.
appcompat_v7/res/values-large-v14/themes_base.xml:22: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Base.AppCompat.Light.DialogWhenLarge.Base'.
Can anyone help me to fix this. Thanks in advance.
I believe there is a bug in the 5.0 appcompat_v7 library. Rolling back to the preview release fixed the problem for me. Hopefully they will release an update/fix soon.
I had the same issue with my copy of v7-appcompat - I could not build it with the same errors.
What worked for me is completely removing the /res directory and copying it back from SDK. It seems that there were some old unused styles left.
Related
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"/>
This may fix your problem
Right side click on your project select Properties -> Select Android
Under Project Build Target, check *Android 6.0 or to the latest API.
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.
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
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**
Tried to compile your project with the android target-sdk-version="21".
It worked for me.
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"/>
I need to add an ad to my application. So I need to include Google Play Services library to my project. I have installed lastest version of Google Play Services (r29) and added to my projects as libProject. But when I add this service lib I'm getting error below:
workspace\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'.
How can I solve this problem ? Thanks for help..
just changed Project SDK to 20 (from 21) and all compiled.
I have solved the problem by checking the Is Library option and I referenced appcompat_v7
I was also facing same problem, but now it's been resolved. Below are the steps I followed
- Go to project properties->Android
- Under 'Project Build Target', select Android 5.0.1. Press and clean the library project.
i programed with eclipse but i try make project today that eclipse make errors.
solution that told all is for android studio.
enter image description here
You should change your target sdk version to 23.
Reason : you may be using support design library (v23.z.z) which is dependent on the sdk version 23
I have updated my all sdk and api version , .... to the last version. but now i have an error in my appcompat_v7. I also reimported the appcompat_v7 project from android sdk support library folder. But it didn't work. my min sdk version is api7 in the project and target sdk is api22 (android 5.1.1). I get this error:error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'.
How can i solve it?
Thank you for your advice.
(sorry for my bad English!)
I am trying to import this material-dialog library.
Getting this error: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light.Dialog.Alert'.
Getting it in file: values-v21/styles.xml.
I am using Eclipse and I have imported android-support-v4.jar in libs folder. What could be the issue here?
In your project properties, make sure that you have selected API level 21 as your platform. Also, in your manifest file, make targetSdkVersion as 21. Then clean & rebuild your project, and it should work.
Whenever you use the new Material Design features or the newest version of the support library, the project needs to be compiled against API level 21.
As a reference for others running into this issue, make sure you've prefixed the name of the parent theme with android:, so the full parent tag will look like this:
parent="android:Theme.Material.Light.Dialog.Alert">
I was getting the same error because I copied some code the didn't include that prefix for some reason.