首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法创建或生成项目:任务':app:transformDexArchiveWithExternalLibsDexMergerForDebug‘执行失败

无法创建或生成项目:任务':app:transformDexArchiveWithExternalLibsDexMergerForDebug‘执行失败
EN

Stack Overflow用户
提问于 2019-08-02 12:14:14
回答 3查看 99关注 0票数 2

一切都运行得很好。在我的应用程序中,我使用毕加索显示图像,默认情况下毕加索将图像旋转90度。我想用Glide替换,我试着在项目中包含Glide。从那时起,我得到了这个错误,即使我从我的项目中删除了Glide,我也不能再构建我的项目。这是我的冰激凌。

Project.gradle

代码语言:javascript
复制
buildscript {
repositories {
    google()
    maven {
        url "https://maven.google.com"
    }
    maven {
        url 'https://maven.fabric.io/public'
    }
    jcenter()
}
dependencies {

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
    classpath 'com.android.tools.build:gradle:3.4.2'
    classpath 'com.google.gms:google-services:4.2.0'
    classpath 'io.fabric.tools:gradle:1.31.0'
}

}

allprojects {
repositories {
    google()
    maven { url "https://maven.google.com" }
    maven { url "https://jitpack.io" }
    jcenter()
}


}


task clean(type: Delete) {
    delete rootProject.buildDir
}

App.gradle

代码语言:javascript
复制
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "xxx"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 40
        versionName "0.0.97"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    compileOptions
            {
                sourceCompatibility JavaVersion.VERSION_1_8
                targetCompatibility JavaVersion.VERSION_1_8
            }
    dexOptions {
        javaMaxHeapSize "8g"
    }
    useLibrary 'org.apache.http.legacy'
}

repositories {
    maven { url "https://jitpack.io" }

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.google.firebase:firebase-messaging:19.0.1'
    implementation 'com.google.firebase:firebase-inappmessaging-display:18.0.1'
    implementation 'com.google.firebase:firebase-dynamic-links:18.0.0'
    implementation 'com.mcxiaoke.volley:library:1.0.19'
    implementation 'gun0912.ted:tedpermission:2.2.2'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'com.github.BlacKCaT27:CurrencyEditText:2.0.2'
    implementation 'com.github.CardinalNow:Android-CircleProgressIndicator:v0.2'
    implementation 'com.txusballesteros:FitChart:1.0'
    implementation 'androidx.multidex:multidex:2.0.1'
    implementation 'com.google.code.gson:gson:2.8.5'
    implementation 'com.google.firebase:firebase-core:17.0.1'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

请帮帮忙。

EN

回答 3

Stack Overflow用户

发布于 2019-08-02 12:24:02

尝试这样做:转到文件>>无效缓存并重新启动。

如果没有帮助,可以像这样手动尝试:

关闭Android Studio

转到C:\Users\UserName.android并重命名:

缓存到build-cache.bak的

  • build文件夹

转到C:\Users\UserName.AndroidStudio3.4.2\system并重命名这些文件夹:

缓存到caches.bak

  • compiler到compiler.bak

  • compile-server到compile-server.bak

  • conversion到conversion.bak

  • external_build_system到external_build_system.bak

  • frameworks到frameworks.bak

  • gradle到gradle.bak

  • resource_folder_cache到resource_folder_cache.bak

  • 缓存

打开Android Studio并再次打开您的项目。希望能有所帮助。

票数 0
EN

Stack Overflow用户

发布于 2019-08-02 13:36:55

1-添加这个

代码语言:javascript
复制
android {
      defaultConfig {
        multiDexEnabled true
        }
   }

  • 同步项目
  • Clean
  • build
票数 0
EN

Stack Overflow用户

发布于 2019-08-02 13:40:15

尝试添加这两个依赖项,并让我知道。

代码语言:javascript
复制
implementation "android.arch.core:runtime:1.1.0"
implementation "android.arch.core:common:1.1.0"
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57319852

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档