Error:Execution failed for task ‘:myapplication:transformClassesWithDexBuilderForDebug’.
com.android.build.api.transform.TransformException: com.android.builder.dexing.DexArchiveBuilderException:
com.android.builder.dexing.DexArchiveBuilderException:
解决方法:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.myapplication"
minSdkVersion 20
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}
// 把jdk依赖添加到上边就解决了
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}