小编Sou*_*zra的帖子

多个dex文件定义了Landroid / support / design / widget / CoordinatorLayout $ 1;

每当我想运行我的项目时,都会出现以下错误

错误:任务':app:transformClassesWithDexForDebug'的执行失败。com.android.build.api.transform.TransformException:com.android.ide.common.process.ProcessException:java.util.concurrent.ExecutionException:com.android.dex.DexException:多个dex文件定义了Landroid / support / design / widget / CoordinatorLayout $ 1;

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    buildToolsVersion "27.0.2"
    defaultConfig {
        applicationId "com.example.invinciblesourav.flacom"
        minSdkVersion 18
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"    
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/'] } }
}

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:appcompat-v7:27.+')
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.google.firebase:firebase-auth:11.0.4'
    compile …
Run Code Online (Sandbox Code Playgroud)

android

2
推荐指数
1
解决办法
8222
查看次数

标签 统计

android ×1