below is my xml file.It gives me err saying thaty "error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.DarkActionBar'."
<!--
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<!-- API 14 theme customizations can go here. -->
</style>
Change parent attribute to parent="android:style/Theme.Holo.Light.DarkActionBar"
Right-click your project in the Package Explorer > select Properties > select Android > and set Project Build Target to API level 14 or higher.
Right Click your project->properties->Android, then Add android-support-v7-appcompat
You can import this library from your android-sdk folder->extras->android->support->v7->appcompat
Related
I have the following error after updating Google Play Services:
[2015-12-19 10:58:19 - google-play-services_lib] C:\Tools\Android\sdk_24\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'.
[2015-12-19 10:58:19 - google-play-services_lib] C:\Tools\Android\sdk_24\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'.
Styles.xml:
<resources>
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
I had already imported appcompat_v7. Everything was working fine before the google play service import.
I had same problem, only that I have found in google code groups was to move to old lib version
Ok I downloaded an older version of Google Play Services as per this answer:
How to download older google play services?
Removed my updated version (from eclipse and disk)
Imported r27 release into Eclipse
No more updating anything again!
I am working with eclipse juno and when i create new application so it contain error.
I am go through with following solution but still the error is there.
1. clean and build the application
2.Add the appcompat_v7 library
please help me to fix this error.![I have added and clean the project but still the error are there][2] [2]:
Do as directed:
Delete appcompat_v7 library library from your project. You will find some errors in your main project.
You will find errors in your styles files in the values folder.
(i) Apply the following lines of code in the styles.xml of your values folder which contains error:
<resources>
<!--
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Light">
<!-- API 11 theme customizations can go here. -->
</style>
</resources>
(ii) Apply these in styles.xml of values-v11 folder:
<resources>
<!--
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<!-- API 11 theme customizations can go here. -->
</style>
</resources>
(iii) Apply these in styles.xml of values-v14 folder:
<resources>
<!--
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<!-- API 11 theme customizations can go here. -->
</style>
</resources>
Inside menu folder, replace app:showAsAction="never" with android:showAsAction="never"
Finally in your MainActivity replace ActionBarActivity with Activity. Remove all the unnecessary imports.
Now hopefully, your project is ready to run.
That is may be because you are not added the appcompact_v7 support jar file to your project properly.Check this link How to add support libraries? will be helpfull.dont forget to restat your eclipse after adding the jar file.
1)add your support library to your project explorer.
2)add jar file inside it to your android project,as suggested in the above link.
3)clean and build your project(or restart eclipse).
below is my xml file.It gives me err saying thaty "error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.DarkActionBar'."
<!--
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<!-- API 14 theme customizations can go here. -->
</style>
Change parent attribute to parent="android:style/Theme.Holo.Light.DarkActionBar"
Right-click your project in the Package Explorer > select Properties > select Android > and set Project Build Target to API level 14 or higher.
Right Click your project->properties->Android, then Add android-support-v7-appcompat
You can import this library from your android-sdk folder->extras->android->support->v7->appcompat
I keep getting an error the values-v11 folder on the style.xml The error says:
error: Error Retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.DarkActionBar'
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<!-- API 14 theme customizations can go here. -->
</style>
I'm using Android SDK 2.3
With android sdk 2.3 you can not control or change behavior of action bar..
for that min sdk should be sdk 3.0 or above.
for further you can see this documentation.
I have created a project with following settings for Target :
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
But following error persists at values-v11 and values-v14:
ERROR : No resource found that matches the given name 'android:Theme.Holo.Light'
<resources>
<!--
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<!-- API 11 theme customizations can go here. -->
</style>
</resources>
Assuming you're using Eclipse, you need to right-click your project in the Package Explorer, select Properties, select Android, and set Project Build Target to API level 14 or higher. Or equivalently, set target=android-14 or higher in your project's project.properties file, but note that this file is autogenerated by Eclipse, so manually editing it is not recommended.
First there is problem in the parent attribute, you have to use parent="android:style/Theme.Holo.Light"
Second, Since Holo Theme was introduced in API level 14... so you have to change your android:minSdkVersion="8" to android:minSdkVersion="11", On newer versions it will automatically use Holo theme. You can further read about Holo Theme at
On Android Developers Blog
on Developers.Android.com
However if you want to support previous versions of Android for Holo Themes. You can use Holoeverywhere library.
TextAppearance.Holo.Widget.ActionBar.Title appears to have been added in API Level 13. Make sure your build target is set to 13, not just 11.
AndroidManifest.xml:
<uses-sdk
android:minSdkVersion=...
android:targetSdkVersion="11" />
you can Click Properties of this project and click Android,chose Target Name byond you aim project.