appcompat dependency error on project - android

Hi I am trying to build my old project nearly two year old and also i am using eclipse but when i add depedency to my project it shows appcombat v7 jar file missing HERE are screen shot
and in my project properties it shows appcombat..../bin appcombat v7.jar file is missing so i copied jar file from sdk and paste it after that my project which shows ! now shows error * also appcombat is showing error please help me guys here is screen shot of that
In appcombat under resource->values-v21->style_base->
<style name="Base.Widget.AppCompat.ActionButton"
parent="android:Widget.Material.ActionButton">
</style>
it shows error Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'.
error log is:
[2015-09-08 11:38:37 - Raftaar_Jyotish] D:\Gaurav\Work\v7\appcompat\res\values-v21\themes_base.xml:137: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
[2015-09-08 11:38:37 - Raftaar_Jyotish]
[2015-09-08 11:38:37 - Raftaar_Jyotish] D:\Gaurav\Work\v7\appcompat\res\values-v21\themes_base.xml:134: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
[2015-09-08 11:38:37 - Raftaar_Jyotish]
[2015-09-08 11:38:37 - Raftaar_Jyotish] D:\Gaurav\Work\v7\appcompat\res\values-v21\themes_base.xml:135: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
[2015-09-08 11:38:37 - Raftaar_Jyotish]
[2015-09-08 11:38:37 - Raftaar_Jyotish] D:\Gaurav\Work\v7\appcompat\res\values-v21\themes_base.xml:144: error: Error: No resource found that matches the given name: attr 'android:windowElevation'.
[2015-09-08 11:38:37 - Raftaar_Jyotish]
[2015-09-08 11:38:37 - Raftaar_Jyotish] D:\Gaurav\Work\v7\appcompat\res\values-v21\themes_base.xml:148: error: Error: No resource found that matches the given name: attr 'android:windowElevation'.
[2015-09-08 11:38:37 - Raftaar_Jyotish] ............
many times

You should import Appcompat as a project, then in properties > android set it to a library (check islibrary), and don't forget to set the appropriate project build target.
After that go to your project and from properties > android add that project as a library

Related

Android appcompat-v7 themes_base.xml No resource found error

I have been trying to import appcompat-v7 into my app and have had no luck at all. I need this library in order to follow the steps listed here How do I use DrawerLayout to display over the ActionBar/Toolbar and under the status bar?. I have followed the steps documented https://developer.android.com/tools/support-library/setup.html, and when I add the library to my project, I'm getting a list of errors:
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:136: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:140: error: Error: No resource found that matches the given name: attr 'android:colorButtonNormal'.
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:138: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:139: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:137: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:134: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:135: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:144: error: Error: No resource found that matches the given name: attr 'android:windowElevation'.
.../sdk/extras/android/support/v7/appcompat/res/values-v21/themes_base.xml:148: error: Error: No resource found that matches the given name: attr 'android:windowElevation'.
I have the build target to API 21 for android-support-v7-appcompat. When I clean that project, I don't receive any errors. When I add appcompat-v7 as a library to my project, that is where the errors start appearing.
I have checked my SDK manager and everything is up to date. Can anyone help steer me in the right direction where I can resolve this issue?

Buck and Android Material theme

I am setting up Buck to speed up the build of an Android app. The app uses the Material Theme through the appcompat-v7:21.0.+ library but Buck cannot find the required resources. Any hints?
Here is the error output:
$ buck build //app/src/main:main
Using buckd.
[-] PROCESSING BUCK FILES...FINISHED 0.4s
[+] BUILDING...2.0s (3/6 JOBS)
|=> IDLE
|=> IDLE
|=> IDLE
|=> //app/src/main:main#aapt_package... 1.5s (running aapt_package[1.5s])
Log:
No Android platform target specified. Using default: Google Inc.:Google APIs:21
app/src/main/res/values/styles.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
app/src/main/res/values/styles.xml:14: error: Error: No resource found that matches the given name: attr 'actionBarSize'.
app/src/main/res/values-v21/styles.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
app/src/main/res/values/styles.xml:23: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
app/src/main/res/values/styles.xml:33: error: Error: No resource found that matches the given name: attr 'actionBarSize'.
app/src/main/res/values/styles.xml:29: error: Error: No resource found that matches the given name: attr 'colorPrimary'.
app/src/main/res/values/styles.xml:38: error: Error: No resource found that matches the given name: attr 'editTextColor'.
app/src/main/res/values-v21/styles.xml:14: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
app/src/main/res/values-v21/styles.xml:32: error: Error: No resource found that matches the given name: attr 'colorPrimary'.
BUILD FAILED: //app/src/main:main#aapt_package failed with exit code 1:
aapt_package
Download appcompat-aar file and use as dependency in your anroid_resource rule
https://github.com/facebookarchive/AntennaPod/blob/buck/BUCK#L133
https://github.com/facebookarchive/AntennaPod/blob/buck/BUCK#L64

Appcompat v7 and ActionBarActivity

I'm following this tutorial to make and app with action bar for 2.3.x devices. But i cannot import appcompat-v7 to my projecto... It gives me lots of errors like these:
[2014-11-06 14:19:23 - AcordeNoPonto] C:\Workspace\appcompat_v7\res\values-v21\themes_base.xml:194: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
[2014-11-06 14:19:23 - AcordeNoPonto] C:\Workspace\appcompat_v7\res\values-v21\themes_base.xml:195: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
[2014-11-06 14:19:23 - AcordeNoPonto] C:\Workspace\appcompat_v7\res\values-v21\themes_base.xml:193: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
[2014-11-06 14:19:23 - AcordeNoPonto] C:\Workspace\appcompat_v7\res\values-v21\themes_base.xml:190: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
[2014-11-06 14:19:23 - AcordeNoPonto] C:\Workspace\appcompat_v7\res\values-v21\themes_base.xml:191: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
[2014-11-06 14:19:23 - AcordeNoPonto] C:\Workspace\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'.
[2014-11-06 14:19:23 - AcordeNoPonto] C:\Workspace\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'.
So i cannot import my app theme and my action bar is not shown...
In project.properties for Your project android-support-v7-appcompat Make sure target value as follow.
Project target.
target=android-21
android.library=true
once you done Clean your Project. I hope this works.
In project.properties of both your project and android-support-v7-appcompat (under res), comment out the target api if not target=android-21 and place the new target code there.
If this doesn't work, or you can't use 21+ api, make sure in your app's project.properties that android.library=false.
Next check your project's Referenced Libraries does not contain v4 in the buildpath. I believe I'm saying this correctly, that v7-appcompat required it (the previous version), but that it is included within the android-support-v7-appcompat file and thus the duplicate entries cause a problem.
I got this problem too. I found many solutions that you must update to Android 5.0 API leveL 21..you can see one of the solutions for updating all IDE. HERE
..
(Note : Following method is my second way solution for me.)
If you don't want to update, you can try existing API level..I found solution in my way is that when you create the new android application project, choose as follow
minSdkVersion= API 14 ,
targetSdkVersion=API 17 ,
compiled with=API 17
Hope, this will help!

R missing after import the Sherlock action bar android

I was creating my project using android 4.4, now I want to build it with android 2.3.3.
I got some errors in my style.xml that theme not supported.
To resolve this error I have imported the Sherlock Action Bar library. Now my style.xml error is resolved but I now get an error 'R' is missing from project
I have cleaned the project but it is not resolved.
Does anyone know how can I resolve this issue ?
My log cat is
[2014-07-21 06:59:00 - PingMyAndroid] C:\Users\Bilal Khalid\android_development\PingMyAndroid\res\values\styles.xml:10: error: Error: No resource found that matches the given name: attr 'android:backgroundStacked'.
[2014-07-21 06:59:00 - PingMyAndroid] C:\Users\Bilal Khalid\android_development\PingMyAndroid\res\values\styles.xml:17: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.DarkActionBar'.
[2014-07-21 06:59:00 - PingMyAndroid] C:\Users\Bilal Khalid\android_development\PingMyAndroid\res\values\styles.xml:18: error: Error: No resource found that matches the given name: attr 'android:actionBarStyle'.
[2014-07-21 06:59:00 - PingMyAndroid] C:\Users\Bilal Khalid\android_development\PingMyAndroid\res\values\styles.xml:20: error: Error: No resource found that matches the given name: attr 'android:alertDialogTheme'.
[2014-07-21 06:59:00 - PingMyAndroid] C:\Users\Bilal Khalid\android_development\PingMyAndroid\res\values\styles.xml:77: error: Error: No resource found that matches the given name: attr 'android:buttonBarButtonStyle'.
[2014-07-21 06:59:00 - PingMyAndroid] C:\Users\Bilal Khalid\android_development\PingMyAndroid\res\values\styles.xml:73: error: Error: No resource found that matches the given name: attr 'android:windowMinWidthMajor'.
[2014-07-21 06:59:00 - PingMyAndroid] C:\Users\Bilal Khalid\android_development\PingMyAndroid\res\values\styles.xml:74: error: Error: No resource found that matches the given name: attr 'android:windowMinWidthMinor'.
[2014-07-21 06:59:00 - PingMyAndroid] C:\Users\Bilal Khalid\android_development\PingMyAndroid\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light'.
[2014-07-21 06:59:00 - PingMyAndroid] C:\Users\Bilal Khalid\android_development\PingMyAndroid\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.DarkActionBar'
.
Did you add ABS as a library to your project? The R file will not generate is there is an error in the xml from what i've experienced.
If you haven't added ABS as a library follow:
Right-click project in package explorer->Properties->Android->Under library click Add->Select ABS->Click ok-> should be good to go after that.

Android Library Import delete R

I'm making a new android app, and I am using the action bar sherlock library.
I imported the library as a project and got two errors.
First, all my layouts are not found in the gen.R file, because I have no gen.R file.
"R cannot be resolved to a variable"
Second, I read in some forums that a clean and rebuild can help, but this did not fix my problem. After a clean, I got this error:
[2011-11-29 12:17:08 - DroidFridge] C:\Users\Felix Wackernagel\Downloads\JakeWharton-ActionBarSherlock-79a1bbc\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'.
[2011-11-29 12:17:08 - DroidFridge] C:\Users\Felix Wackernagel\Downloads\JakeWharton-ActionBarSherlock-79a1bbc\library\res\values-v11\abs__styles.xml:47: error: Error: No resource found that matches the given name: attr 'android:actionBarSize'.
[2011-11-29 12:17:08 - DroidFridge] C:\Users\Felix Wackernagel\Downloads\JakeWharton-ActionBarSherlock-79a1bbc\library\res\values-v11\abs__styles.xml:48: error: Error: No resource found that matches the given name: attr 'android:actionBarStyle'.
[2011-11-29 12:17:08 - DroidFridge] C:\Users\Felix Wackernagel\Downloads\JakeWharton-ActionBarSherlock-79a1bbc\library\res\values-v11\abs__styles.xml:50: error: Error: No resource found that matches the given name: attr 'android:actionBarTabBarStyle'.
[2011-11-29 12:17:08 - DroidFridge] C:\Users\Felix Wackernagel\Downloads\JakeWharton-ActionBarSherlock-79a1bbc\library\res\values-v11\abs__styles.xml:49: error: Error: No resource found that matches the given name: attr 'android:actionBarTabStyle'.
[2011-11-29 12:17:08 - DroidFridge] C:\Users\Felix Wackernagel\Downloads\JakeWharton-ActionBarSherlock-79a1bbc\library\res\values-v11\abs__styles.xml:51: error: Error: No resource found that matches the given name: attr 'android:actionBarTabTextStyle'.
[2011-11-29 12:17:08 - DroidFridge] C:\Users\Felix Wackernagel\Downloads\JakeWharton-ActionBarSherlock-79a1bbc\library\res\values-v11\abs__styles.xml:52: error: Error: No resource found that matches the given name: attr 'android:actionButtonStyle'.
[2011-11-29 12:17:08 - DroidFridge] C:\Users\Felix Wackernagel\Downloads\JakeWharton-ActionBarSherlock-79a1bbc\library\res\values-v11\abs__styles.xml:53: error: Error: No resource found that matches the given name: attr 'android:actionDropDownStyle'.
[2011-11-29 12:17:08 - DroidFridge] C:\Users\Felix Wackernagel\Downloads\JakeWharton-ActionBarSherlock-79a1bbc\library\res\values-v11\abs__styles.xml:54: error: Error: No resource found that matches the given name: attr 'android:actionMenuTextAppearance'.
[2011-11-29 12:17:08 - DroidFridge] C:\Users\Felix Wackernagel\Downloads\JakeWharton-ActionBarSherlock-79a1bbc\library\res\values-v11\abs__styles.xml:55: error: Error: No resource found that matches the given name: attr 'android:actionMenuTextColor'.
[2011-11-29 12:17:08 - DroidFridge] C:\Users\Felix Wackernagel\Downloads\JakeWharton-ActionBarSherlock-79a1bbc\library\res\values-v11\abs__styles.xml:56: error: Error: No resource found that matches the given name: attr 'android:actionModeBackground'.
[2011-11-29 12:17:08 - DroidFridge] C:\Users\Felix Wackernagel\Downloads\JakeWharton-ActionBarSherlock-79a1bbc\library\res\values-v11\abs__styles.xml:57: error: Error: No resource found that matches the given name: attr 'android:actionModeCloseButtonStyle'.
...
This XML-Files comes from the ActionBarSherlock Library.
The Library as project didn't show an error.
Can anybody help me?
Make sure that your project and the imported library use the same Android version.
This is often related to the Android version your project uses, specifically if you import something that is a different version than your project.
For a walkthrough to fix the problem, see my answer here
The problem was not the Android Version it was the Java Version. Most of the Android library and also Android too, can not handle Java 1.7. I change my project properties and build my project under java 1.6 and it works. Same problem by HoloEverywhere.
Please note that to compile an android project successfully and to have it run on older version of android is (mostly) a different thing.
for your answer,
android:Theme.Holo is android Honeycomb and above theme. So ActionbarSherlock & your project must be compiled with (minimum) API level 11 (Android 3.0). Usually I just pick ICS (14+)
to have it run on older version of android:
open your project manifest file, change the line:
<uses-sdk android:targetSdkVersion="14"/>
to
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="14"/>
Your android app can run from API level 7 (2.2) to API level 14 (4.0).
You can test by running it with 2.2 emulator.
Note that ActionbarSherlock doesn't run with API level lower than 7.

Categories

Resources