I am using Maven with the android maven plugin to build my Android project.
I am trying to add a dependency for ActionBarSherlock using Maven.
<dependency>
<groupId>com.actionbarsherlock</groupId>
<artifactId>actionbarsherlock</artifactId>
<version>4.2.0</version>
<type>apklib</type>
</dependency>
I have specified my pom.xml compiler version to 1.6
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
I depend on the correct version of the Android library from Maven:
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
I am using API level 16 of Android which is:
– The highest available on Maven central repo
– The version used to build the 4.2.0 version of ActionBarSherlock
A representative portion of the error is here:
\target\unpack\apklibs\com.actionbarsherlock_actionbarsherlock_apklib_4.2.0\res\values-v14\abs__styles.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar'.
\target\unpack\apklibs\com.actionbarsherlock_actionbarsherlock_apklib_4.2.0\res\values-v14\abs__styles.xml:6: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar.Solid'.
\target\unpack\apklibs\com.actionbarsherlock_actionbarsherlock_apklib_4.2.0\res\values-v14\abs__styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar'.
\target\unpack\apklibs\com.actionbarsherlock_actionbarsherlock_apklib_4.2.0\res\values-v14\abs__styles.xml:10: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.Solid'.
\target\unpack\apklibs\com.actionbarsherlock_actionbarsherlock_apklib_4.2.0\res\values-v14\abs__styles.xml:12: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.Solid.Inverse'.
etc...
Make sure you are declaring the platform version for the android-maven-plugin.