首页 > 解决方案 > 任务 ':app:mergeDebugResources' 执行失败。com.android.build.gradle.internal.res.ResourceCompilerRunnable

问题描述

在此处输入图像描述

当我添加google-services.json时,我从firebase获取了这个文件,然后当我将此文件复制到我的应用程序java(生成)时自动创建了两个文件,res中的res(生成)有一个文件名value.xml并且错误来失败编译值文件。当我尝试构建

这是我的 build.gradle(:app)

`插件 { id 'com.android.application' }

android { compileSdkVersion 30 buildToolsVersion "30.0.3"

defaultConfig {
    applicationId "com.delivery.hth0131"
    minSdkVersion 16
    targetSdkVersion 30
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

}

依赖{

implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation platform('com.google.firebase:firebase-bom:28.0.1')
implementation 'com.google.firebase:firebase-analytics'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.google.firebase:firebase-core:19.0.0'
implementation 'com.google.firebase:firebase-database:20.0.0'
implementation 'info.hoang8f:fbutton:1.0.5'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'

} 应用插件:'com.google.gms.google-services'`

标签: androidfirebasegradle

解决方案


推荐阅读