I'm having an issue building my project with Apache's Ant which includes ActionbarSherlock as a project library. I have successfully included the library using "android update lib-project --path . --target android-13" in actionbarsherlock library folder and in my project used "android update project --path . --target android-13 --library path/to/actionbarsherlock/library"
Using ant debug builds the library correctly but when going to my project folder and trying to build the project i get the following errors:
[aapt] /var/www/vhosts/nicom/httpdocs/cl_app/res/values/style.xml:40: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Sherlock.Light'.
[aapt] /var/www/vhosts/nicom/httpdocs/cl_app/res/values/style.xml:41: error: Error: No resource found that matches the given name: attr 'abBackground'.
[aapt] /var/www/vhosts/nicom/httpdocs/cl_app/res/values/style.xml:42: error: Error: No resource found that matches the given name: attr 'abLogo'.
[aapt] /var/www/vhosts/nicom/httpdocs/cl_app/res/values/style.xml:43: error: Error: No resource found that matches the given name: attr 'actionBarSize'.
Has anyone successfully built a project with this library? I'm guessing this is a library specific error and has nothing to do with my project in general but some one please correct me if I'm wrong.
Actually, I had this same problem and it was very frustrating because I didn't know what it is that I was doing wrong. But it turns out that there is some issue with the android-sdk that doesn't allow custom attributes to be defined in a library project.
Google Issue page shows that this has been open for a long time!
So for now, if you really need to use the library, you need to copy all the layout files that are present there in the library. (I know, it sucks!)
Related
i recently downloaded the android sdk but when i try to create a new android project in eclipse , it always shows the same error
[2016-04-15 01:22:40 - HelloWorld3] C:\Users\Admin\workspace\HelloWorld3\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2016-04-15 01:22:40 - HelloWorld3]
[2016-04-15 01:22:40 - HelloWorld3] C:\Users\Admin\workspace\HelloWorld3\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2016-04-15 01:22:40 - HelloWorld3]
[2016-04-15 01:22:40 - HelloWorld3] C:\Users\Admin\workspace\HelloWorld3\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
[2016-04-15 01:22:40 - HelloWorld3]
the project is not created. i was using eclipse luna before, i reinstalled eclipse and now i have mars 2. i also deleted the latest packages from SDK manager. these are the only solutions i have found
another thing that i noticed is that eclipse is not working as it should after installing android sdk. for example the icon doesnt change. in the welcome page after installing sdk, it does not give me the option to choose from existing SDKs. when i click File -> New , there is no android application project, and i have to select project then click on android and then android application project.
can someone pls help ??
You are missing the support project ....
Do this:
File -> Import (android-sdk\extras\android\support\v7). And there choose "appcompat"
Project -> properties -> Android. In the section library "Add" and choose "appCompat"
To be honest with you, you will have less headache if you start using Android Studio, since it is now the official IDE for andoid and you recieve all the latest updates pretty much automatically. But if you Really have to work with Eclipse for some reason thats how you do it:
File -> Import (android-sdk\extras\android\support\v7). And there choose "appcompat"
Project -> properties -> Android. In the section library "Add" and choose "appCompat"
The error says you that you are missing "appCompat".
I said pretty much same that #ΦXoce 웃 Пepeúpa did but really consider going to Android Studio.
I have been struggling with eclipse for about a month now .I deleted eclipse software even booted my pc thinking it have have confilicts with my other software.Even my teacher couldnt help me to fix this. Every time i try to create an android projects i get a lot of error from the start .Appcompact shows up with error .I found here people giving advices i did all of that but nothing has worked for me .
On console :
C:\Users\mm\Desktop\workspaceandroid\appcompat_v7\res\values-v21\themes_base.xml:193: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
C:\Users\mm\Desktop\workspaceandroid\appcompat_v7\res\values-v21\themes_base.xml:190: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
C:\Users\mm\Desktop\workspaceandroid\appcompat_v7\res\values-v21\themes_base.xml:191: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
when i check the error section it shows :
Description Resource Path Location Type
error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'. styles_base.xml /appcompat_v7/res/values-v21 line 75 Android AAPT Problem
Description Resource Path Location Type
The container 'Android Dependencies' references non existing library 'C:\Users\mm\Desktop\workspaceandroid\appcompat_v7\bin\appcompat_v7.jar' Testapp Build path Build Path Problem
Description Resource Path Location Type
The project cannot be built until build path errors are resolved Testapp Unknown Java Problem
Please any one can help me fix this problem , i couldnt advance on my projects because of it.I would really apreciate your help.
i do not know so i will just post this.. fyi: i have not specifically experienced this type of error, but more like it..
1 : delete the android-support-v4.jar in your project and copy the appcompat_v7's rather
2 : Delete the all the files in the bin folder of the appcompat_v7 and clean and build and restart (if this doesn't work at the 1st instance, disable build automatically-[by clicking the project on your eclipse], and redo the no2 and save and restart eclipse, and build save, and restart..)
3 : right click on your appcompat_v7 project goto build path then configure build path
then java build path and to the tab order and export and uncheck all the libs there the ones ending with .jar ... if you do not see .jar files then (uncheck android private libraries)(goes with the condition - that's a hard guess because on my project its checked)
4 : if you have other libraries then follow number 2(and 3) on them (3 is optional)
5 : if none of them are working check if there's some update on the adt or anything that can be updated
Always clean rebuild and restart eclipse okay.. Hope it helps
You should open the project.properties file from android-support-v7-appcompat and change the target api level to target=android-21.
Don't forget to clean the workspace after that using Project --> Clean...
I updated my Sdk manager,eclipse & ADT but now old projects are not
running. Its giving like error below
C:\Users\Deepak\Desktop\New
folder\VishwasBawa\res\values-v11\styles.xml:7: error: Error
retrieving parent for item: No resource found that matches the given
name 'Theme.AppCompat.Light'.
C:\Users\Deepak\Desktop\New
folder\VishwasBawa\res\values-v14\styles.xml:8: error: Error
retrieving parent for item: No resource found that matches the given
name 'Theme.AppCompat.Light.DarkActionBar'.
It looks like you're using the appcompat v7 library in your project. If you do, to resolve the error you've got, open project.properties file in your imported appcompat v7 project and change the target value to target.target=android-21 and save the file. Then, clean all Android projects. This should fix the errors in your Android project.
Note: Changing the target value to target.target=android-21 is equivalent to selecting the Properties of the appcompat project. Then, select Android | Project Build Target | Android 5.0.1.
I need to implement the actionbar in Android 2.x I've tried with this post and setup the support library as mentioned in thisofficial article.
Here are the steps that I've followed for implement the ActionBar using the appcompat support library:
First, I create the project with the following configuration (I don't create an icon and a default activity):
Minimum Required SDK: API 10: Android 2.3.3 (Gingerbread)
Target SDK: API 19: Android 4.4
Compile with: API 10: Android 2.3.3 (Gingerbread)
Theme: None
After, in the Project properties => Android => Library I add the android-support-v7-appcompat library project.
After this, I get 128 errors like this in the project where I use the appcompat library. All of them are related with the Holo theme:
[2013-12-06 13:24:24 - UsingSupportActionBar] C:\dev\Java\android\adt-bundle-windows-x86_64\sdk\extras\android\support\v7\appcompat\res\values-v14\styles_base.xml:24: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar'.
Please, note that the error only occurs with the values-v14 and values-v11 folders in the appcompat library project. Here are 2 examples of the errors I get:
[2013-12-06 13:24:24 - UsingSupportActionBar] C:\dev\Java\android\adt-bundle-windows-x86_64\sdk\extras\android\support\v7\appcompat\res\values-v14\styles_base.xml:100: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Subtitle.Inverse'.
[2013-12-06 13:24:24 - UsingSupportActionBar] C:\dev\Java\android\adt-bundle-windows-x86_64\sdk\extras\android\support\v7\appcompat\res\values-v11\styles_base.xml:26: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ProgressBar.Horizontal'.
Also, there are few error not related with the Holo theme:
[2013-12-06 13:24:38 - UsingSupportActionBar] C:\dev\Java\android\adt-bundle-windows-x86_64\sdk\extras\android\support\v7\appcompat\res\values-v14\styles_base.xml:225: error: Error: No resource found that matches the given name: attr 'android:dividerPadding'.
[2013-12-06 13:24:38 - UsingSupportActionBar] C:\dev\Java\android\adt-bundle-windows-x86_64\sdk\extras\android\support\v7\appcompat\res\values-v14\styles_base.xml:224: error: Error: No resource found that matches the given name: attr 'android:showDividers'.
[2013-12-06 13:24:38 - UsingSupportActionBar] C:\dev\Java\android\adt-bundle-windows-x86_64\sdk\extras\android\support\v7\appcompat\res\values-v11\themes_base.xml:33: error: Error: No resource found that matches the given name: attr 'android:windowActionBar'.
[2013-12-06 13:24:38 - UsingSupportActionBar] C:\dev\Java\android\adt-bundle-windows-x86_64\sdk\extras\android\support\v7\appcompat\res\values-v11\themes_base.xml:44: error: Error: No resource found that matches the given name: attr 'android:windowActionBar'.
[2013-12-06 13:24:38 - UsingSupportActionBar] C:\dev\Java\android\adt-bundle-windows-x86_64\sdk\extras\android\support\v7\appcompat\res\values-v14\themes_base.xml:41: error: Error: No resource found that matches the given name: attr 'android:actionBarWidgetTheme'.
[2013-12-06 13:24:38 - UsingSupportActionBar] C:\dev\Java\android\adt-bundle-windows-x86_64\sdk\extras\android\support\v7\appcompat\res\values-v14\themes_base.xml:67: error: Error: No resource found that matches the given name: attr 'android:actionBarWidgetTheme'.
[2013-12-06 13:24:38 - UsingSupportActionBar] C:\dev\Java\android\adt-bundle-windows-x86_64\sdk\extras\android\support\v7\appcompat\res\values-v14\themes_base.xml:94: error: Error: No resource found that matches the given name: attr 'android:actionBarWidgetTheme'.
Has anyone had the same problem?
Set "Compile with" to API Level 19 as well - when you compile your app with SDK level 10, the compiler doesn't know the elements shown in the error log.
You need to reference the res directory from AppCompat to your project. There you can find all resource files, which are needed for the Support ActionBar.
How to add those resource files is described pretty good on the google developer site: http://developer.android.com/tools/support-library/setup.html
Scroll down to :"Adding libraries with resources".
Follow the instructions and everything should be fine ;)
As blackfizz said, http://developer.android.com/tools/support-library/setup.html should give you a good how-to on how to setup the library in Eclipse.
On another note though: I can highly recommend using Android Studio IDE, as it supports the gradle build system which will enormously help with your struggle with setting up the different libraries.
If you're using gradle, all you have to do is add:
dependencies {
...
compile "com.android.support:appcompat-v7:18.0.+"
}
to your build.gradle file and gradle will do the rest for you. Other third party libraries can also be added super easily. They'll automatically be resolved through Maven Central.
I've switched over to Android Studio IDE with gradle a few weeks ago and I never want to miss it again.
Right click -> Property -> Switch tab to Android -> Select project build target api level 16
Add android:targetSdkVersion="16" in manifest file.
Your manifest looks like this:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="android.support.v7.appcompat">
<uses-sdk android:minSdkVersion="7"
android:targetSdkVersion="16"/>
<application />
</manifest>
Clean and build library project.
That's IT.
Go to Manifest.xml file of your project. Then set android:minSdkVersion="11".
It will solve your problem. Late reply but may be helpful for others.
I am developing an app named "AndroidDataBase".
while am trying to compile in eclipse I am getting this error
Error executing aapt: Return code -1073741819 AndroidDataBase line 1 Android ADT Problem
and
Project 'AndroidDataBase' is missing required Java project: 'GoogleMaps' .
Where GoogleMaps is another androidApp.
I have the GoogleMap.java in AndroidDataBase "Src" folder.
I have tried clean build ,restarting eclipse sort of things ,still no result
Why am i getting this error ,and how to resolve it?
Thanks in advance
I have added the GoogleMap.java
the issue is activity_googlemap its not getting identified
although it is present in res/layout
You need to add the "google-play-services_lib" project as a library project. You will find it in your_sdk_root_path/extras/google/google_play_services/libproject/google-play-services_lib
Set your Project Build Target to Google API Build. From right click on project and go to Preference>Android tab>Select Target build of Google API.
I Dint installed the "Google Play Service" present in the SDK Manager .
Once I did that ,all I need is to follow the solution of # Joan P.S(Stated above I have accepted the ans,thanks to him.).
After that I have to add the Google MAP project(import it to the current work space(another app )) in Properties->Java Build Path->Projects .
That's how it got solved