com.android.dex.DexException:多个dex文件定义LSevenZip / CRC

时间:2017-05-10 16:48:25

标签: android compiler-errors

我的build.gradle文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "25.0.3"
    defaultConfig {
        applicationId "com.example.varuniyer.contetto"
        minSdkVersion 16
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

}

dependencies {
    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:22.2.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
    compile files('/Users/varuniyer/AndroidStudioProjects/Contetto/xwalk_core_library/libs/xwalk_core_library.jar')
    compile files('/Users/varuniyer/AndroidStudioProjects/Contetto/xwalk_shared_library/libs/xwalk_shared_library.jar')
}

我正在尝试创建一个Crosswalk Android示例应用程序。

我一直收到这个错误:

* What went wrong:
Execution failed for task ':app:transformClassesWithDexForDebug'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define LSevenZip/CRC;

我看过其他问题,但他们的解决方案都没有奏效。我现在很难做什么。

提前致谢。

1 个答案:

答案 0 :(得分:0)

尝试只是拉入核心库,即从构建中删除以下行:

编译文件('/ Users / varuniyer / AndroidStudioProjects / Contetto / xwalk_shared_library / libs / xwalk_shared_library.jar')

值得查看此链接: https://crosswalk-project.org/documentation/shared_mode.html