android - 无法生成签名的APK。重复的条目:DragAndDropPermissionsCompat.class

标签 android gradle

生成签名的apk时,我遇到此错误:

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v13/view/DragAndDropPermissionsCompat.class



引用链接之一说要更新依赖关系,所以我做了,但仍然没有帮助。

我的gradle依赖项看起来像:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:27.1.0'
compile 'com.android.support:design:27.1.0'
compile 'com.google.firebase:firebase-auth:11.6.0'
compile 'com.google.firebase:firebase-core:11.6.0'
compile 'com.google.android.gms:play-services-auth:11.6.0'
compile 'com.google.android.gms:play-services-places:11.6.0'
compile 'com.google.android.gms:play-services-ads:11.6.0'
compile 'com.google.android.gms:play-services-maps:11.6.0'
compile 'com.google.android.gms:play-services-location:11.6.0'
compile 'agency.tango.android:material-intro-screen:0.0.4'
compile 'com.android.support:recyclerview-v7:27.1.0'
compile 'com.android.support:cardview-v7:27.1.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.afollestad.material-dialogs:core:0.8.6.1'
compile 'com.afollestad.material-dialogs:commons:0.8.6.1'
compile 'com.tumblr:remember:1.0.0@aar'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.5@aar'
compile 'com.wang.avi:library:2.1.3'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.makeramen:roundedimageview:2.2.1'
compile 'com.toptoche.searchablespinner:searchablespinnerlibrary:1.3.1'
compile 'com.wdullaer:materialdatetimepicker:3.5.1'
compile 'com.shawnlin:number-picker:2.4.5'
compile 'io.github.luizgrp.sectionedrecyclerviewadapter:sectionedrecyclerviewadapter:1.2.0'
compile 'com.kofigyan.stateprogressbar:stateprogressbar:0.0.8'
compile 'com.github.jhonnyx2012:horizontal-picker:1.0.6'
compile 'com.zhihu.android:matisse:0.4.3'
compile 'uk.co.chrisjenx:calligraphy:2.2.0'
//debugCompile 'com.squareup.okhttp3:logging-interceptor:3.3.1'
testCompile 'junit:junit:4.12'
compile("com.github.hotchemi:permissionsdispatcher:3.2.0") {
    // if you don't use android.app.Fragment you can exclude support for them
    exclude module: "support-v13"
}
annotationProcessor "com.github.hotchemi:permissionsdispatcher-processor:3.2.0"
}

在我的项目级别gradle中,我正在这样做:
buildscript {
repositories {
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:2.2.3'
    classpath 'com.google.gms:google-services:3.1.0'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}

allprojects {
repositories {
    mavenCentral()
    jcenter()
    maven {
        url "https://jitpack.io"
        }
    maven { url "https://maven.google.com" }
}
}

除了link之外,我没有在互联网上找到任何帮助,但仍然没有任何进展。

最佳答案

这个answer解决了。 this文章有助于解决该错误。

关于android - 无法生成签名的APK。重复的条目:DragAndDropPermissionsCompat.class,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50796595/

相关文章:

java - Linux - Android Studio 1.1 Beta 3 - 未找到默认 Activity

java - 如何自动添加gradle依赖

android - 三个依赖的区别

android - 为什么 android 深度链接使我在 Whatsapp 上的链接在 Whatsapp 的应用程序中打开?

android - 尝试在 Android Studio 中升级到 Kotlin 1.4.10 时出现异常

gradle - Android studio 2.0 gradle transformClassesWithDexForDebug 使用按钮时失败 "run"

android - processDebugMainManifest 失败,我在使用 targetSdkVersion 为 31 时遇到此错误

android - 如何将重定向 URI 与 OAuth2.0 和 Box 一起用于我的 Android 应用程序?

gradle - 在另一台机器上构建并运行gradle项目

eclipse - Gradle无法找到tools.jar