相关疑难解决方法(0)

无法合并dex

我有Android Studio Beta.我创建了一个新项目,编译我的旧模块,但是当我尝试启动应用程序时,它没有启动消息:

Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
Run Code Online (Sandbox Code Playgroud)

com.android.builder.dexing.DexArchiveMergerException:无法合并dex

但我不知道如何解决这个错误.我用谷歌搜索了几个小时但没有成功.

我的项目是:

    // Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.0-beta6'
        classpath "io.realm:realm-gradle-plugin:3.7.1"
        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 {
        jcenter()
        google()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)

我的应用程序gradle:

    apply plugin: 'com.android.application'

android …
Run Code Online (Sandbox Code Playgroud)

android dex android-studio-3.0

296
推荐指数
16
解决办法
35万
查看次数

标签 统计

android ×1

android-studio-3.0 ×1

dex ×1