嘗試APK構建但錯誤apk構建錯誤。怎麼解決?執行失敗的任務「:應用程序:transformClassesWithDexForDebug」
錯誤:執行失敗的任務「:應用程序: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 Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
gradle這個文件
應用插件: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "my packagename"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
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:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'gun0912.ted:tedpermission:1.0.2'
testCompile 'junit:junit:4.12'
}
有什麼不好?
從'gradlew app:dependencies'的輸出發佈'releaseCompileClasspath'節。 – DeKaNszn
https://stackoverflow.com/a/33430306/3395198 –