Build problem: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo'.

1,301 views
Skip to first unread message

Jim R

unread,
Jan 9, 2012, 5:33:29 PM1/9/12
to CSipSimple Development
Hello

I am trying for the first time to build csipsimple. I have apparently
successfully built pjsip. However, I am having problems when
attempting to build csipsimple proper. I get numerous errors along the
lines of:

[aapt] /home/jim/work/csipsimple/ActionBarSherlock/res/values-v11/
abs__styles.xml:4: error: Error retrieving parent for item: No
resource found that matches the given name
'android:Theme.Holo'.

I suspect this is something to do with me having chosen to configure
the project for android-7 (android version 2.1). However, using
android-7 is necessary for being able to run on 2.1, no?

Any help appreciated. Note that I have only done *very* minor Android
development work up to now.

Thanks

---


Here's what I did and what I got (from a workspace pulled yesterday -
2012-01-08):

> cd CSipSimple
> android update project -p . -t android-7
...
> ant debug
Buildfile: /home/jim/work/csipsimple/CSipSimple/build.xml

-set-mode-check:

-set-debug-files:

-set-debug-mode:

-debug-obfuscation-check:

-setup:
[echo] Gathering info for SipHome...
[setup] Android SDK Tools Revision 16
[setup] Project Target: Android 2.1
[setup] API level: 7
[setup]
[setup] ------------------
[setup] Resolving library dependencies:
[setup] /home/jim/work/csipsimple/CSipSimple: ../ActionBarSherlock
=> /home/jim/work/csipsimple/
ActionBarSherlock
[setup]
------------------
[setup] Ordered
libraries:
[setup] /home/jim/work/csipsimple/
ActionBarSherlock
[setup]
------------------

[setup]
[setup] WARNING: Attribute minSdkVersion in AndroidManifest.xml
(4) is lower than the project target API level
(7)
...
...
-code-gen:
[echo] ----------
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[renderscript] No RenderScript files to compile.
[echo] ----------
[echo] Handling Resources...
[aapt] Generating resource IDs...
[aapt] /home/jim/work/csipsimple/ActionBarSherlock/res/values-v11/
abs__styles.xml:4: error: Error retrieving parent for item: No
resource found that matches the given name
'android:Theme.Holo'.
[aapt] /home/jim/work/csipsimple/ActionBarSherlock/res/values-v11/
abs__styles.xml:48: error: Error: No resource found that matches the
given name: attr
'android:actionBarSize'.
[aapt] /home/jim/work/csipsimple/ActionBarSherlock/res/values-v11/
abs__styles.xml:49: error: Error: No resource found that matches the
given name: attr 'android:actionBarStyle'.
...
...

Régis Montoya

unread,
Jan 9, 2012, 7:29:43 PM1/9/12
to csipsim...@googlegroups.com
Hi,

ActionBarSherlock android target version is at least 13.

You have to distinguish :
* The actual target version to use with the app. In fact it's the jar
version of android library you'll link on and that will provide to you
methods, constants and resources. Keep in mind that linking android 13
for example does *NOT* means that you'll not get something compatible
with lower version. If application is properly developed and take care
about backward compatibility, it is always better to use the latest
available android sdk version. That's a very common mistake of new
developers to android that introduced this very bad rumor about the fact
it's impossible or very hard to manage android fragmentation while this
OS is very good on this point from android 1.6.
* The announced min sdk. This one is set in the manifest and is used
on the market and at installation time to know if your application can
be installed on a given platform.
* The announced target sdk. This one is also set in the manifest and
it's used to interprete default values and behaviors for your
application. (For example it may be used to activate some backward
compatibility mode for older version). If application is tested and up
to date, it's also better to use the latest version to use latest features.

So in your case, seems that you choosed android 7 (2.1) as linked jar.
This one does not contains resources for Holo theme that was introduced
in android 10 (3.0). So build fail and that's absolutely normal.
Note that the correct version of the project is under version control
(http://code.google.com/p/csipsimple/source/browse/trunk/ActionBarSherlock/project.properties
) and if you have a closer look to your svn status of actionbar project
I'm pretty sure that you (or some android sdk command you did) modified
this.
However, it's probably not your fault : android tool and eclipse both
use to overwrite this value if you don't care about.

You may also face the same problem on csipsimple project if you did the
same kind of import, so also check project.properties of CSipSimple
folder too before your build.

Regards,
R�gis

Jim Robinson

unread,
Jan 9, 2012, 9:04:00 PM1/9/12
to csipsim...@googlegroups.com
Hi

OK - I've updated to 15 and have successfully built.

Thanks for the information re what the version actually means.

Jim

2012/1/9 Régis Montoya <r3gi...@gmail.com>
Hi,

ActionBarSherlock android target version is at least 13.

You have to distinguish :
 * The actual target version to use with the app. In fact it's the jar version of android library you'll link on and that will provide to you methods, constants and resources. Keep in mind that linking android 13 for example does *NOT* means that you'll not get something compatible with lower version. If application is properly developed and take care about backward compatibility, it is always better to use the latest available android sdk version. That's a very common mistake of new developers to android that introduced this very bad rumor about the fact it's impossible or very hard to manage android fragmentation while this OS is very good on this point from android 1.6.
 * The announced min sdk. This one is set in the manifest and is used on the market and at installation time to know if your application can be installed on a given platform.
 * The announced target sdk. This one is also set in the manifest and it's used to interprete default values and behaviors for your application. (For example it may be used to activate some backward compatibility mode for older version). If application is tested and up to date, it's also better to use the latest version to use latest features.

So in your case, seems that you choosed android 7 (2.1) as linked jar. This one does not contains resources for Holo theme that was introduced in android 10 (3.0). So build fail and that's absolutely normal.
Note that the correct version of the project is under version control (http://code.google.com/p/csipsimple/source/browse/trunk/ActionBarSherlock/project.properties ) and if you have a closer look to your svn status of actionbar project I'm pretty sure that you (or some android sdk command you did) modified this.
However, it's probably not your fault : android tool and eclipse both use to overwrite this value if you don't care about.

You may also face the same problem on csipsimple project if you did the same kind of import, so also check project.properties of CSipSimple folder too before your build.

Regards,
Régis
Reply all
Reply to author
Forward
0 new messages