相关疑难解决方法(0)

maven依赖项org.apache.commons有什么区别:commons-io和commons-io:commons-io?

Maven存储库包含以下两个依赖项:org.apache.commons:commons-io:1.3.2commons-io:commons-io:1.3.2.有什么区别,我应该在我的pom.xml中使用哪一个?

一般来说,一些apache commons软件包位于http://repo1.maven.org/maven2/org/apache/commons/,大多数commons-*软件包都位于http://repo1.maven.org/maven2/.

dependencies apache-commons maven

18
推荐指数
2
解决办法
6090
查看次数

Android Gradle编译commons-io在库树中创建副本

我正在尝试构建和维护一个旧的应用程序,但我无法通过构建阶段.在我的app/build.gradle文件中我有

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.apache.commons:commons-io:1.3.2'
    //some more libraries compiled as well
}
Run Code Online (Sandbox Code Playgroud)

但在尝试执行时遇到以下错误:

错误:任务':myApp'的执行失败.com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:org/apache/commons/io/CopyUtils.class

这几乎可以肯定是因为当我编译那个jar时,在我的外部库树的顶部,生成了这个:

在此输入图像描述

为什么会发生这种情况,如何让它停止以便我可以完成构建?

java android gradle

7
推荐指数
3
解决办法
8129
查看次数

使用Robospice和Android Studio的Commons-Io重复输入错误

几个小时以来我一直在研究以下问题,但还没有找到解决问题的方法.我已经尝试了Stack Overflow中的以下修复(Android Studio更新到1.0会破坏Gradle插件v0.13.1之后的MultiDex重复Zip条目),但它们都没有工作.

我在尝试构建程序时遇到以下错误:

Execution failed for task ':app:packageAllDebugClassesForMultiDex'.
> java.util.zip.ZipException: duplicate entry: org/apache/commons/io/CopyUtils.class
Run Code Online (Sandbox Code Playgroud)

该错误似乎表明commons-io在构建过程中被包含两次

我正在使用Android Studio和Gradle来包含多个Robospice依赖项.这是我的Gradle构建文件的依赖项部分:

dependencies {
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.android.support:support-v4:21.0.3'
    compile 'com.google.android.gms:play-services:6.5.87'

    compile'com.google.api-client:google-api-client-android:1.19.0'


    // You must install or update the Google Repository through the SDK manager to use this dependency.
    // The Google Repository (separate from the corresponding library) can be found in the Extras category.
    //compile 'com.google.android.gms:play-services:4.3.23'
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile "com.jakewharton:butterknife:${butterknifeVersion}"
    compile 'com.sun.jersey:jersey-bundle:1.8'
    compile 'com.google.code.gson:gson:2.3'
    compile 'org.codehaus.jackson:jackson-core-asl:1.9.0' …
Run Code Online (Sandbox Code Playgroud)

android gradle apache-commons-io robospice android-studio

4
推荐指数
1
解决办法
9835
查看次数