当前位置: 首页 > 知识库问答 >
问题:

TaskExecutionException:任务“:App:CheckDebugDuplicateClasses”执行失败

璩珂
2023-03-14

我刚把我的Android Studio更新到3.5版本。当我运行应用程序错误发生。

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.alquickstop"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    //noinspection GradleCompatible
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.google.code.gson:gson:2.8.1'
    implementation 'com.android.volley:volley:1.1.0'
    implementation 'com.github.paolorotolo:appintro:4.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

gradle(应用程序):

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath 'com.google.gms:google-services:4.0.2'
    }
}
allprojects {
    repositories {
        google()
        jcenter()
        mavenCentral()
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
        maven { url "https://jitpack.io" }
    }
}
task clean(type: Delete) {
    delete rootProject.buildDir
}

共有1个答案

柯英奕
2023-03-14

在模块classes.jar(com.android.support.v4.AccessibilityService.AccessibilityServiceInfoCompat)和classes.jar(com.android.support:support-v4:23.3.0)中发现的重复类

你应该加上

configurations {
    all*.exclude group: 'com.android.support', module: 'support-v4'
}
 类似资料: