DexArchiveBuilderException [英] DexArchiveBuilderException

查看:436
本文介绍了DexArchiveBuilderException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道已经问过这个问题,但是那里提供的解决方案对我不起作用,我不能冒险使用d8编译器进行构建.这是错误:

I know that this question is already asked but the solutions provided there are not working for me and i can't risk the build with d8 compiler. Here is the error:

Error:Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process E:\suv\Projects\SoundRecorder\ImageFetcher\app\build\intermediates\classes\debug
Error:com.android.builder.dexing.DexArchiveBuilderException: Failed to process E:\suv\Projects\SoundRecorder\ImageFetcher\app\build\intermediates\classes\debug
Error:com.android.builder.dexing.DexArchiveBuilderException: Error while dexing Services/MyFirebaseInstanceIDService.class
Error:com.android.dx.cf.iface.ParseException: class name (services/MyFirebaseInstanceIDService) does not match path (Services/MyFirebaseInstanceIDService.class)

成绩文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "ops.com.imagefetcher"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            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.constraint:constraint-layout:1.0.2'
    implementation 'com.google.firebase:firebase-messaging:11.0.4'
    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'

}


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

请帮助我解决此问题.

Please help me to fix this issue.

在尝试修复它时,我做了清理项目",然后又出了一个错误:

While trying to fix it I did "clean project" and one more error came out:

Error:Execution failed for task ':app:clean'.
> Unable to delete directory: E:\suv\Projects\SoundRecorder\ImageFetcher\app\build\intermediates\classes\debug

推荐答案

执行干净的构建后,出现错误:

After doing clean build i got error:

execution failed for task ':app:clean'.
> Unable to delete directory: E:\suv\Projects\SoundRecorder\ImageFetcher\app\build\intermediates\classes\debug

然后我尝试从android studio中手动删除该程序包,但显示了一些IOException错误.然后我要做的是:我关闭了android studio,并按照错误的路径从"MyComputer/ThisPC"中手动删除了 debug 文件夹.修复之后,android studio成功创建了构建.

Then I tried to delete the package manually from android studio but it showed some IOException error. Then what i did is: I closed the android studio and manually deleted the debug folder from "MyComputer/ThisPC" by following the path from error. After this fix, android studio successfully created the build.

这篇关于DexArchiveBuilderException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆