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!
Related
I'm trying to fix a couple errors that I'm getting when trying to create a new Android Application Project in Eclipse.
The following errors occur:
[2016-11-17 15:22:52 - Chatter] C:\Users\Chris\AppData\Local\Android\sdk\extras\android\support\v7\appcompat\res\values-v23\styles_base.xml:20: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
[2016-11-17 15:22:48 - Chatter]
[2016-11-17 15:22:48 - Chatter] C:\Users\Chris\AppData\Local\Android\sdk\extras\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'.
[2016-11-17 15:22:48 - Chatter]
I have tried the following things:
Imported android-support-v7-appcompat into the project. Also created the reference.
Changed project.properties > target from android-19 to android-21
My project setup:
Minimum required SDK: API 14
Target SDK: API 21
Compile with: API 21
Blank Activity - Default names for everything.
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
Im trying to add a Library Project (https://github.com/inmite/android-styled-dialogs) to my Android Studio project.
However I get the following build errors because my build is not able to reference the values in the Android-styled-dialog LibraryProject
android-apt-compiler: [NavigationDrawer] /Users/Jase/Downloads/NavigationDrawer/res/values-v11/themes_apptheme.xml:23: error: Error retrieving parent for item: No resource found that matches the given name 'DialogStyleLight'.
android-apt-compiler: [NavigationDrawer] /Users/Jase/Downloads/NavigationDrawer/res/values-v11/themes_apptheme.xml:30: error: Error: No resource found that matches the given name: attr 'buttonBackgroundColorNormal'.
android-apt-compiler: [NavigationDrawer] /Users/Jase/Downloads/NavigationDrawer/res/values-v11/themes_apptheme.xml:29: error: Error: No resource found that matches the given name: attr 'buttonSeparatorColor'.
....
I don't really know anything about Gradle but I feel that I possibly need to tell the build to reference Android-styled-dialog. I don't know I'm completely lost...
PS: When I created a new android studio project with the demo project for Android-Styled-Dialogs it created the following mavin file... which I don't have in my other project - https://gist.github.com/anonymous/8207108
I don't really know anything about Java build systems, please help
I have followed the the guides on few sites and I cannot get it to work. I made sure they I created the project from existing source, and include as libraries in my project, checked targets, etc. I'm not sure what I'm missing.
I get the following errors:
[2012-08-29 21:04:45 - IT Guru] C:\Workspace\HoloEverywhereLib\res\values\styles.xml:246: error: Error: No resource found that matches the given name: attr 'windowActionBar'.
[2012-08-29 21:04:45 - IT Guru] C:\Workspace\HoloEverywhereLib\res\values\styles.xml:247: error: Error: No resource found that matches the given name: attr 'windowNoTitle'.
[2012-08-29 21:04:45 - IT Guru] C:\Workspace\HoloEverywhereLib\res\values-v14\styles.xml:12: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Sherlock'.
[2012-08-29 21:04:45 - IT Guru] C:\Workspace\HoloEverywhereLib\res\values-v14\styles.xml:14: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Sherlock.Light'.
[2012-08-29 21:04:45 - IT Guru] C:\Workspace\HoloEverywhereLib\res\values-v14\styles.xml:16: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Sherlock.Light.DarkActionBar'.
[2012-08-29 21:04:45 - IT Guru] C:\Workspace\HoloEverywhereLib\res\values-v14\styles.xml:18: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Sherlock.ForceOverflow'.
[2012-08-29 21:04:45 - IT Guru] C:\Workspace\HoloEverywhereLib\res\values-v14\styles.xml:20: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Sherlock.Light.ForceOverflow'.
[2012-08-29 21:46:56 - IT Guru] C:\Workspace\HoloEverywhereLib\res\values\styles.xml:247: error: Error retrieving parent for item: No resource found that matches the given name '#style/Theme.HoloEverywhereDark.Sherlock'.
[2012-08-29 21:46:56 - IT Guru] C:\Workspace\HoloEverywhereLib\res\values\styles.xml:253: error: Error retrieving parent for item: No resource found that matches the given name '#style/Theme.HoloEverywhereLight.Sherlock'.
Guides Followed:
Error importing HoloEverywhere
https://github.com/ChristopheVersieux/HoloEverywhere
The HoloEverywhere guide you linked to is a small bit out-of-date, the two themes are now called Holo.Theme and Holo.Theme.Light.
So change these lines in your Android manifest:
android:theme="#style/Theme.HoloEverywhereDark.Sherlock"
or
android:theme="#style/Theme.HoloEverywhereLight.Sherlock"
to
android:theme="#style/Holo.Theme"
or
android:theme="#style/Holo.Theme.Light"
Then Project->Clean and see if the errors disappear.
As you are using Sherlock theme(Not integrated Android Theme) you need to import that additional package under ProjectName/ folder
+ProjectName
src
gen
Android2.1
Sherlock.jar(Import tht .jar file under root Folder)
bin
. . .
I solved the problem by setting the android target of all the projects to the newest android version (v.17 atm)
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.