在app中为gradle构建错误

问题描述 投票:1回答:2

错误:任务':app:transformClassesWithMultidexlistForDebug'的执行失败。

java.io.IOException:无法写[G:\ new \ Schat \ app \ build \ intermediates \ multi-dex \ debug \ componentClasses.jar](无法读取[C:\ Users \ Dell.gradle \ caches \ transforms-1 \ files-1.1 \ support-core-ui-27.1.0.aar \ 56bf57c0daa4e0ce1427f0af1690a5ff \ jars \ classes.jar(;;;;;; **。class)](重复的zip条目[classes.jar:安卓/支持/设计/空间/ CoordinatorLayout $ Behavior.class]))

Build.gradle 

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
defaultConfig {
    applicationId "com.example.sushem.schat"
    minSdkVersion 15
    targetSdkVersion 26
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner 
    "android.support.test.runner.AndroidJUnitRunner"
    multiDexEnabled true


}
buildTypes {
    release {
        minifyEnabled true

        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro'
    }
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
compile 'com.google.firebase:firebase-messaging:11.8.0'
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'
compile 'de.hdodenhof:circleimageview:2.2.0'
compile 'com.theartofdev.edmodo:android-image-cropper:2.6.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.okhttp:okhttp:2.5.0'
compile 'com.firebaseui:firebase-ui-database:3.2.2'
compile 'id.zelory:compressor:2.1.0'

compile 'com.android.support:multidex:1.0.2'


}

申请插件:'com.google.gms.google-services'

java android gradle
2个回答
0
投票

使用最新版本的支持库

implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:design:27.1.0' 

0
投票

谢谢大家的帮助。问题在于依赖:

编译'com.theartofdev.edmodo:android-image-cropper:2.6.0'

所以我删除了它。

© www.soinside.com 2019 - 2024. All rights reserved.