sak*_*sak 1 android android-gradle-plugin
我知道这个问题已经被问到了,但是那里提供的解决方案对我不起作用,我不能冒险使用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)
Run Code Online (Sandbox Code Playgroud)
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'
Run Code Online (Sandbox Code Playgroud)
请帮我解决这个问题.
编辑:尝试修复它时,我做了"清理项目",又出现了一个错误:
Error:Execution failed for task ':app:clean'.
> Unable to delete directory: E:\suv\Projects\SoundRecorder\ImageFetcher\app\build\intermediates\classes\debug
Run Code Online (Sandbox Code Playgroud)
做干净的构建后我得到错误:
execution failed for task ':app:clean'.
> Unable to delete directory: E:\suv\Projects\SoundRecorder\ImageFetcher\app\build\intermediates\classes\debug
Run Code Online (Sandbox Code Playgroud)
然后我尝试从android studio手动删除包,但它显示了一些IOException错误.然后我做的是:我关闭android工作室并通过遵循错误路径从"MyComputer/ThisPC" 手动删除调试文件夹.在此修复之后,android studio成功创建了构建.
| 归档时间: |
|
| 查看次数: |
6847 次 |
| 最近记录: |