Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building a project with Ant that includes ActionbarSherlock as a library project

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.

like image 719
user1179330 Avatar asked Jan 31 '12 02:01

user1179330


1 Answers

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!)

like image 53
Anand Sainath Avatar answered Oct 19 '22 00:10

Anand Sainath