【问题标题】:gradle duplicate entry FloatPropertygradle 重复条目 FloatProperty
【发布时间】:2015-07-22 06:54:32
【问题描述】:

我已将 spinnerwheel 模块添加到我的项目中,但它不再构建。它有某种与 Nineoldandroids 库的重复条目,该库包含在 spinnerwheel 模块中。我在构建期间收到此错误

Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'.
    > java.util.zip.ZipException: duplicate entry: com/nineoldandroids/util/FloatProperty.class

我在 app 文件夹上运行了../gradlew dependencies,这是我在 spinnerwheel 模块下找到的:

\--- *********-android3.5:spinnerwheel:unspecified
     \--- LOCAL: nineoldandroids-2.2.0.jar

这是我的 build.gradle 文件:

dependencies {
    compile 'com.android.support:appcompat-v7:22.0.+'
    compile 'com.android.support:support-v4:22.+'
    //noinspection GradleCompatible
    compile 'com.android.support:multidex:1.0.0'
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.facebook.android:facebook-android-sdk:3.23.0'
    compile 'com.google.android.gms:play-services:6.5.87'
    compile 'org.apache.httpcomponents:httpmime:4.3.5'
    compile 'org.apache.httpcomponents:httpclient:4.3.5'
    compile 'com.github.castorflex.smoothprogressbar:library-circular:1.0.1'
    compile project(':loopj')
    compile project(':StackBlur')
    compile 'it.sephiroth.android.library.horizontallistview:hlistview:1.2.2'
    compile 'it.sephiroth.android.library.imagezoom:imagezoom:+'
    compile 'com.navercorp.pulltorefresh:library:3.2.0@aar'
    compile 'com.edmodo:cropper:1.0.1'
    compile 'com.getbase:floatingactionbutton:1.7.0'
    compile 'com.afollestad:material-dialogs:0.6.6.3'
    compile 'com.sothree.slidinguppanel:library:3.0.0'
    compile 'com.github.traex.rippleeffect:library:1.2.3'
    compile 'in.srain.cube:grid-view-with-header-footer:1.0.11'
    compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
    compile 'cn.pedant.sweetalert:library:1.3'
    compile 'com.github.johnpersano:supertoasts:1.3.4@aar'
    compile 'com.github.johnkil.android-appmsg:appmsg:1.2.0'
    compile('com.crashlytics.sdk.android:crashlytics:2.2.4@aar') {
        transitive = true;
    }
    compile 'io.branch.sdk.android:library:1.5.5'
    compile 'com.kyleduo.switchbutton:library:1.2.8'
}

【问题讨论】:

  • show your app gradle .. 看来你已经添加了 2 次库
  • 我添加了一个链接
  • 你能试试这个吗,看起来像同样的问题stackoverflow.com/questions/26718825/…
  • 在这里发布你的 build.gradle
  • lib文件夹是否包含nineoldandroids jar?

标签: android debugging gradle


【解决方案1】:

只需在你的 gradle 部分添加这个compile 'compile 'com.nineoldandroids:library:2.4.0' 并更新minifyEnabled false 而不是minifyEnabled true Like

【讨论】:

  • 我应该从模块中删除 jar 吗?
  • 是的。升级您的项目并重新启动。快乐编码
猜你喜欢
  • 1970-01-01
  • 2015-03-25
  • 1970-01-01
  • 2017-05-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-11-21
相关资源
最近更新 更多