繁体   English   中英

使用Wheel Picker执行任务':app:transformClassesWithJarMergingForDebug'的执行失败

[英]Execution failed for task ':app:transformClassesWithJarMergingForDebug' with Wheel Picker

这是我在stackoverflow上的第一篇文章,不幸的是,这是一个有关bug的问题:'(.。在Github上将项目添加到Android Studio后,它可以正常运行,但是当我构建可在手机上运行的APK时,它给了我错误:

    FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/aigestudio/wheelpicker/BuildConfig.class

我在网上搜索了解决方案,但他们说的是关于重复班级的事情,并重建了项目,但是所有这些对我都不起作用。 这是我的gradle文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "25.0.3"
    defaultConfig {
        applicationId "com.example.tiena.amsconnection"
        minSdkVersion 19
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })

    compile project(':WheelPicker')

    compile project(path: ':expanding-view')

    configurations.all {
        resolutionStrategy.eachDependency { DependencyResolveDetails details ->
            def requested = details.requested
            if (requested.group == 'com.android.support') {
                if (!requested.name.startsWith("multidex")) {
                    details.useVersion '26.0.1'
                }
            }
        }
    }

    compile 'com.android.support:multidex:1.0.1'
    compile 'com.android.support:appcompat-v7:26.0.1'
    compile 'com.android.support:design:26.0.1'
    compile 'com.android.support:support-vector-drawable:26.0.1'
    compile 'com.google.firebase:firebase-core:11.2.0'
    compile 'com.google.firebase:firebase-messaging:11.2.0'
    compile 'com.google.firebase:firebase-database:11.2.0'
    compile 'com.google.android.gms:play-services:11.2.0'
    compile 'com.firebaseui:firebase-ui:2.3.0'
    compile 'com.facebook.android:facebook-android-sdk:4.22.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'cn.aigestudio.wheelpicker:WheelPicker:1.1.2'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.github.techery:properratingbar:0.0.5'
    compile 'com.ramotion.foldingcell:folding-cell:1.2.1'
    compile 'com.github.clans:fab:1.6.4'
    compile 'com.google.firebase:firebase-storage:11.2.0'
    compile 'com.android.support:support-v4:26.+'
    testCompile 'junit:junit:4.12'
}

apply plugin: 'com.google.gms.google-services'

请帮助我:'(这是我的第一个大项目。谢谢

从依赖项中删除以下行:

compile 'cn.aigestudio.wheelpicker:WheelPicker:1.1.2'

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM