如果我只ViewPagerIndicator
用作依赖项目,那么一切都很好。但是在我导入之后ActionBarSherlock
,发生了一些错误。
这是输出日志:
125 || [INFO] ------------------------------------------------------------------------
126 || [INFO] BUILD FAILURE
127 || [INFO] ------------------------------------------------------------------------
128 || [INFO] Total time: 33.129s
129 || [INFO] Finished at: Thu Sep 19 14:33:23 CST 2013
130 || [INFO] Final Memory: 19M/102M
131 || [INFO] ------------------------------------------------------------------------
132 || [ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.2-SNAPSHOT:dex (default-dex) on project rms: MojoExecutionException: ANDROID-040-001: Could not execute: Command = /bin/sh -c cd /Users/ccheng/workspace/rms && /System/Library/Java/JavaVirtualMachines/1.6.0. jdk/Contents/Home/bin/java -Xmx1024M -jar /Users/ccheng/program/adt-bundle-mac-x86_64-20130219/sdk/build-tools/18.0.1/lib/dx.jar --dex --output=/Users/ccheng/ workspace/rms/target/classes.dex /Users/ccheng/.m2/repository/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar /Users/ccheng/.m2/repository/com/google/ code/gson/gson/2.2.4/gson-2.2.4.jar /Users/ccheng/.m2/repository/com/biubiubiu/indexablelistview-lib2/1.0.0-SNAPSHOT/indexablelistview-lib2-1.0.0-SNAPSHOT.apklib / Users/ccheng/.m2/repository/com/biubiubiu/indexablelistview-lib1/1.0.0-SNAPSHOT/indexablelistview-lib1-1.0.0-SNAPSHOT.apklib /Users/ccheng/.m2/repository/com/novoda/ imageloader/imageloader-core/1.5.8/imageloader-core-1.5.8.jar /Use
133 || rs/ccheng/.m2/repository/com/github/chrisbanes/pulltorefresh/library/2.1.1/library-2.1.1.apklib /Users/ccheng/workspace/rms/target/classes /Users/ccheng/.m2/ repository/com/tjerkw/slideexpandablelistview-library/1.1.0-SNAPSHOT/slideexpandablelistview-library-1.1.0-SNAPSHOT.apklib /Users/ccheng/.m2/repository/com/google/ android/support-v4/r7/support-v4-r7.jar /Users/ccheng/.m2/repository/msx/android/preferences/libraryprojects-lib1/1.0.0-SNAPSHOT/libraryprojects-lib1-1.0.0-SNAPSHOT. apklib /Users/ccheng/.m2/repository/com/actionbarsherlock/actionbarsherlock/4.3.1/actionbarsherlock-4.3.1.apklib /Users/ccheng/.m2/repository/com/meishixing/android- async-http/1.4.2/android-async-http-1.4.2.jar /Users/ccheng/.m2/repository/com/viewpagerindicator/library/2.4.1/library-2.4.1.apklib /Users/ccheng/.m2/repository/ android/support/compatibility-v4/18/compatibility-v4-18.jar, Result = 1 -> [Help 1]
134 || [ERROR]
135 || [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
136 || [ERROR] Re-run Maven using the -X switch to enable full debug logging.
137 || [ERROR]
138 || [ERROR] For more information about the errors and possible solutions, please read the following articles:
139 || [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
140 || make: *** [main] Error 1
➜ /tmp /bin/sh -c cd /Users/ccheng/workspace/rms && /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -Xmx1024M -jar /Users/ccheng/program/adt-bundle-mac-x86_64-20130219/sdk/build-tools/18.0.1/lib/dx.jar --dex --output=/Users/ccheng/workspace/rms/target/classes.dex /Users/ccheng/.m2/repository/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar /Users/ccheng/.m2/repository/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar /Users/ccheng/.m2/repository/com/biubiubiu/indexablelistview-lib2/1.0.0-SNAPSHOT/indexablelistview-lib2-1.0.0-SNAPSHOT.apklib /Users/ccheng/.m2/repository/com/biubiubiu/indexablelistview-lib1/1.0.0-SNAPSHOT/indexablelistview-lib1-1.0.0-SNAPSHOT.apklib /Users/ccheng/.m2/repository/com/novoda/imageloader/imageloader-core/1.5.8/imageloader-core-1.5.8.jar /Users/ccheng/.m2/repository/com/github/chrisbanes/pulltorefresh/library/2.1.1/library-2.1.1.apklib /Users/ccheng/workspace/rms/target/classes /Users/ccheng/.m2/repository/com/tjerkw/slideexpandablelistview-library/1.1.0-SNAPSHOT/slideexpandablelistview-library-1.1.0-SNAPSHOT.apklib /Users/ccheng/.m2/repository/com/google/android/support-v4/r7/support-v4-r7.jar /Users/ccheng/.m2/repository/msx/android/preferences/libraryprojects-lib1/1.0.0-SNAPSHOT/libraryprojects-lib1-1.0.0-SNAPSHOT.apklib /Users/ccheng/.m2/repository/com/actionbarsherlock/actionbarsherlock/4.3.1/actionbarsherlock-4.3.1.apklib /Users/ccheng/.m2/repository/com/meishixing/android-async-http/1.4.2/android-async-http-1.4.2.jar /Users/ccheng/.m2/repository/com/viewpagerindicator/biubiubiu-library/2.4.1/biubiubiu-library-2.4.1.apklib /Users/ccheng/.m2/repository/android/support/compatibility-v4/18/compatibility-v4-18.jar
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/FragmentManagerState;
at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
at com.android.dx.dex.file.DexFile.add(DexFile.java:163)
at com.android.dx.command.dexer.Main.processClass(Main.java:490)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:459)
at com.android.dx.command.dexer.Main.access$400(Main.java:67)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:398)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:245)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:131)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:109)
at com.android.dx.command.dexer.Main.processOne(Main.java:422)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:333)
at com.android.dx.command.dexer.Main.run(Main.java:209)
at com.android.dx.command.dexer.Main.main(Main.java:174)
at com.android.dx.command.Main.main(Main.java:91)
这是我的 pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.biubiubiu.rms</groupId>
<artifactId>rms</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>apk</packaging>
<name>rms</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<fest-assert.version>1.0.4</fest-assert.version>
<junit.version>4.10</junit.version>
<robolectric.version>2.0</robolectric.version>
<android.version>4.1.1.4</android.version>
<android-support.version>r13</android-support.version>
</properties>
<dependencies>
<dependency>
<groupId>android</groupId>
<artifactId>android</artifactId>
<version>4.2.2_r2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>android.support</groupId>
<artifactId>compatibility-v4</artifactId>
<version>18</version>
</dependency>
<dependency>
<groupId>com.tjerkw</groupId>
<artifactId>slideexpandablelistview-library</artifactId>
<version>1.1.0-SNAPSHOT</version>
<type>apklib</type>
</dependency>
<dependency>
<groupId>com.meishixing</groupId>
<artifactId>android-async-http</artifactId>
<version>1.4.2</version>
<type>jar</type>
</dependency>
<!--<dependency>-->
<!--<groupId>com.</groupId>-->
<!--<artifactId>biubiubiu-library</artifactId>-->
<!--<version>2.4.1</version>-->
<!--<type>apklib</type>-->
<!--</dependency>-->
<dependency>
<groupId>com.viewpagerindicator</groupId>
<artifactId>library</artifactId>
<version>2.4.1</version>
<type>apklib</type>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>com.github.chrisbanes.pulltorefresh</groupId>
<artifactId>library</artifactId>
<version>2.1.1</version>
<type>apklib</type>
</dependency>
<dependency>
<groupId>com.novoda.imageloader</groupId>
<artifactId>imageloader-core</artifactId>
<version>1.5.8</version>
</dependency>
<dependency>
<groupId>com.biubiubiu</groupId>
<artifactId>indexablelistview-lib2</artifactId>
<version>1.0.0-SNAPSHOT</version>
<type>apklib</type>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.squareup</groupId>
<artifactId>fest-android</artifactId>
<version>${fest-assert.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.robolectric</groupId>
<artifactId>robolectric</artifactId>
<version>${robolectric.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>msx.android.preferences</groupId>
<artifactId>libraryprojects-lib1</artifactId>
<version>1.0.0-SNAPSHOT</version>
<type>apklib</type>
</dependency>
<dependency>
<groupId>com.actionbarsherlock</groupId>
<artifactId>actionbarsherlock</artifactId>
<version>4.3.1</version>
<type>apklib</type>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<sourceDirectory>src</sourceDirectory>
<testSourceDirectory>test</testSourceDirectory>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.6.2-SNAPSHOT</version>
<configuration>
<sdk>
<platform>17</platform>
</sdk>
<manifest>
<debuggable>true</debuggable>
</manifest>
</configuration>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
<!--jarsign-->
<profiles>
<profile>
<id>sign</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<id>signing</id>
<goals>
<goal>sign</goal>
</goals>
<phase>package</phase>
<inherited>true</inherited>
<configuration>
<archiveDirectory></archiveDirectory>
<includes>
<include>target/*.apk</include>
</includes>
<keystore>/Users/ccheng/workspace/msx-crazysight/meishixing.keystore</keystore>
<storepass>meishigo</storepass>
<keypass>meishigo</keypass>
<alias>meishixing</alias>
<arguments>
<argument>-sigalg</argument><argument>MD5withRSA</argument>
<argument>-digestalg</argument><argument>SHA1</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<inherited>true</inherited>
<configuration>
<sign>
<debug>false</debug>
</sign>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>