Unable to add appcompact v7 library into my project? - android

I just want to add v7 lib to my existing project in order to add navigation drawer but my whole project gets error and it shows some error in console in the resource of v7 lib(android-support-v7-appcompat\res\values-v23\styles_base_text.xml:19).
android-support-v7-appcompat\res\values-v23\styles_base_text.xml:19: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
and many more.
I have changed the target version to the higher level (Android 5.1.1 )and i have cleaned the project.Tried many alternative methods coudn't find the possible solution.

In order to use the latest version of appcompat (which you are based on the existence of values-v23), you must set your targetSdkVersion to 23. For future reference, the appcompat version number always needs to be the same as your target SDK.

Related

Type error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. styles.xml Android AAPT

I am getting error as
Type error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. styles.xml /res/values line 7 Android AAPT Problem
I have created the android app using settings in Android JUNO:
Min Req SDK: API 8,
Target SDK: API 21,
Compile With: API 25,
Theme: Holo Light with Dark Action Bar (Also tried with None),
Create Activity: checked,
Create Activity: Blank Activity (Also tried Empty Activity),
I have also tried upgrading Android Support Library from Android sdk, but did not help.
When I tried to import, AppCompat is not present anywhere.
Also when I tried to Add Library from Project Properties, there is no AppCompat available there.
Please help me with detailed explanation or let me know if any more details are needed.
I have solved this one by downloading Android Studio and while installing I have selected "Do not import anything from previous installation". There may be problem with my previous installation with Eclipse Juno.
I Hope this will help someone looking for an answer.

Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'

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

material-dialog lib, error: No resource found that matches the given name 'android:Theme.Material.Light.Dialog.Alert'

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.

ADT returns error when I changed the Project Build Target

I recently changed my Project Build Target from Android 2.3.3 to Google APIs and from this time I get an error from the values-v11 folder which says
error: Error retrieving parent for item: No resource found that
matches the given name 'android:Theme.Holo.Light'.
Maybe I need to remove that folder or there is something else I can do to include this theme in my app
2.3.3 is doesn't have the Holo styles and resources. So, it will give this error.
You have two options:
Remove those styles
Switch to latest SDK
BTW, any specific reason of using build target as 2.3.3? You could have the target set to the latest version, and run your app on 2.3.3 as well.

use ActionBarSherlock as library in my own project

I am using ActionBarSherlock to implement action bar on my Android 2.1 API 7 project. (With Eclipse IDE)
In order to use sherlock, I imported sherlock library as a existing project on Eclipse. Then, I added it as library on my own project.
However, in my own project, the Eclipse's console shows me the following error:
JakeWharton-ActionBarSherlock-436230d/library/res/values-v11/abs__styles.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo'.
JakeWharton-ActionBarSherlock-436230d/library/res/values-v11/abs__styles.xml:48: error: Error: No resource found that matches the given name: attr 'android:actionBarSize'.
JakeWharton-ActionBarSherlock-436230d/library/res/values-v11/abs__styles.xml:49: error: Error: No resource found that matches the given name: attr 'android:actionBarStyle'.
...
Why??
(I have set target SDK to Android 3.2 for Sherlock.)
Set target SDK to Android 3.2(Version 14) or above. Your desired version can be anything from Android 1.5 (version 7?) upward if I remember correctly.
Afaik you have to use the api level 14 (or at least honeycomb) library when using ActionBarSherlock. You can still set the minimum version to 7, but the target version has to be ICS (or maybe honeycomb).
But then you have to make sure that you're not using any methods introduced in later versions.
Open the ABS Properties and the change the Project Build Target in the Android tab to 13.
Set in Android-manifest file to target sdk to 14

Categories

Resources