Android studio 3.0 java.lang.RuntimeException:com.android.builder.dexing.DexArchiveMergerException:无法合并dex

时间:2018-01-03 06:01:04

标签: java android runtime-error

我遇到了这个错误:

  

错误:任务':app:transformDexArchiveWithExternalLibsDexMergerForDebug'执行失败。   java.lang.RuntimeException:java.lang.RuntimeException:com.android.builder.dexing.DexArchiveMergerException:无法合并dex

我尝试过清洁和重建,但那没有用。

我的项目build.gradle是

buildscript {

repositories {
    google()
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.0.0'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}

  allprojects {
repositories {
    jcenter({url "http://jcenter.bintray.com/"})
    google()
    jcenter()
}
}

 task clean(type: Delete) {
   delete rootProject.buildDir
  }

我的module.build是

android {
compileSdkVersion 26
defaultConfig {
    applicationId "com.example.pulkitkumar.shield"
    minSdkVersion 26
    targetSdkVersion 26
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation files('libs/iccc.jar')
implementation files('libs/knoxsdk.jar')
implementation files('libs/framework.jar')
implementation files('libs/sec_edm.jar')
implementation files('libs/KnoxReflection.jar')
}

0 个答案:

没有答案
相关问题