gpt4 book ai didi

java - 错误:任务应用程序执行失败:transformClassesWithMultidexlistForDebug'

转载 作者:行者123 更新时间:2023-12-03 05:44:51 25 4
gpt4 key购买 nike

我在项目中添加了一些依赖项,当我运行它时,此错误显示:

Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'. > java.io.IOException: Can't write [D:\android\projects\android-client\app\build\intermediates\multi-dex\debug\componentClasses.jar] (Can't read [D:\android\projects\android-client\app\build\intermediates\transforms\desugar\debug\47.jar(;;;;;;**.class)] (Duplicate zip entry [47.jar:android/support/design/widget/CoordinatorLayout$Behavior.class]))



这是我的 build.gradle文件:
apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.arizeh.arizeh"
minSdkVersion 17
targetSdkVersion 22
multiDexEnabled true
versionCode 31
versionName "3.0.5"
useLibrary 'org.apache.http.legacy'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
manifestPlaceholders = [manifestApplicationId : "",
onesignal_app_id : "",
onesignal_google_project_number: ""]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
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:26.0.0-beta1'
compile 'com.google.android.gms:play-services-plus:15.0.1'
compile 'com.google.android.gms:play-services-analytics:15.0.2'
compile 'com.google.android.gms:play-services-nearby:15.0.1'
compile 'com.google.android.gms:play-services-maps:15.0.1'
compile 'com.google.android.gms:play-services-places:15.0.1'
compile 'com.google.android.gms:play-services-location:15.0.1'
compile 'com.google.android.gms:play-services-gcm:15.0.1'
compile 'com.google.android.gms:play-services-base:15.0.1'
compile 'com.google.firebase:firebase-messaging:15.0.2'
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:cardview-v7:26.1.0'
compile 'uk.co.chrisjenx:calligraphy:2.1.0'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.koushikdutta.ion:ion:2.+'
compile 'com.android.support:percent:26.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.shawnlin:number-picker:2.4.2'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.android.support:multidex:1.0.3'
compile 'com.android.support:support-compat:26.1.0'
compile 'com.daimajia.easing:library:2.0@aar'
compile 'com.daimajia.androidanimations:library:2.2@aar'

compile 'com.zarinpal:purchase:0.0.3-beta'

compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
compile "com.android.support:support-core-ui:26.4.0"
implementation 'com.rahnema.vas3gapi:vas3g-api:2.0.0'

}
apply plugin: 'com.google.gms.google-services'

最佳答案

您需要使用相同版本的支持库。在依赖性块中,添加多个版本的支持库:

compile 'com.android.support:appcompat-v7:26.0.0-beta1'
compile 'com.android.support:design:26.1.0'
compile "com.android.support:support-core-ui:26.4.0"

仅使用 26.1.026.4.0一个版本。不要使用Beta版本。

关于java - 错误:任务应用程序执行失败:transformClassesWithMultidexlistForDebug',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50598106/

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