gpt4 book ai didi

java - 错误 :Execution failed for task ':app:transformClassesWithMultidexlistForDebug' . 问题

转载 作者:行者123 更新时间:2023-11-30 10:19:03 39 4
gpt4 key购买 nike

我对 android studio 3 有这个问题,

Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.

java.io.IOException: Can't write [C:\Users\karam\Desktop\android\app\build\intermediates\multi-dex\debug\componentClasses.jar] (Can't read [C:\Users\karam.gradle\caches\transforms-1\files-1.1\support-compat-25.2.0.aar\c04eaa88d08211c4eca04dcb2a06098c\jars\classes.jar(;;;;;;**.class)] (Duplicate zip entry [classes.jar:android/support/v4/view/ViewCompat.class]))

这是build.gradle文件

apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.boy.adventure"
minSdkVersion 14
targetSdkVersion 25
multiDexEnabled true

ndk {
moduleName "player_shared"
}
}
buildTypes {
release {
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}


}
sourceSets.main {
jni.srcDirs = []// <-- disable automatic ndk-build call
}
productFlavors {
}
}

dependencies {
compile('com.google.android.gms:play-services:+') { exclude module: 'support-v4' }
compile files('libs/dagger-1.2.2.jar')
compile files('libs/javax.inject-1.jar')
compile files('libs/nineoldandroids-2.4.0.jar')
compile files('libs/support-v4-19.0.1.jar')
compile 'com.android.support:multidex:1.0.1'
}

最佳答案

请不要为您的依赖项使用动态版本!在我们的案例中,这导致了问题(库使用动态版本支持库并导致与我们定义的版本发生冲突) http://blog.danlew.net/2015/09/09/dont-use-dynamic-versions-for-your-dependencies/

关于java - 错误 :Execution failed for task ':app:transformClassesWithMultidexlistForDebug' . 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48916254/

39 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com