gpt4 book ai didi

android - DexArchiveBuilderException

转载 作者:行者123 更新时间:2023-11-29 14:23:48 25 4
gpt4 key购买 nike

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

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)

Gradle 文件:

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'

请帮我解决这个问题。

编辑:在尝试修复它时,我做了“清理项目”,但又出现了一个错误:

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

最佳答案

在完成清理构建后我得到了错误:

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 成功创建构建。

关于android - DexArchiveBuilderException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48802977/

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