I was shocked by this for several hours (which is why I also added generosity), but here is how I finally solved it.
First of all, check your dependencies on the path to the project using
mvn dependency:build-classpath
I could immediately see the problem on the output:
<home>/.m2\repository\android\extras\android-support\v4\android-support-v4.jar <home>/.m2\repository\android\platforms\android\android-18\android-android-18.jar <home>/.m2\repository\com\actionbarsherlock\actionbarsherlock\4.4.0\actionbarsherlock-4.4.0.apklib <home>/.m2\repository\com\google\android\support-v4\r7\support-v4-r7.jar <... more jars>
Two cans of support are included, and support-v4-r7.jar
redefines my new android-support-v4.jar
.
The older ActionBarSherlock was loaded in my project (in your project, any of the apklib dependencies may be the culprit), so I excluded it in the pom project:
<dependency> <groupId>com.actionbarsherlock</groupId> <artifactId>actionbarsherlock</artifactId> <version>4.4.0</version> <type>apklib</type> <exclusions> <exclusion> <groupId>com.google.android</groupId> <artifactId>support-v4</artifactId> </exclusion> </exclusions> </dependency>
Hope this helps someone.
Nachi source share