任务“:app:mergeDebugResources”执行失败。 com.android.build.gradle.internal.res.ResourceCompilerRunnable

时间:2021-05-16 10:53:01

标签: android firebase gradle

enter image description here

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

这是我的 build.gradle(:app)

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

安卓{ 编译SDK版本30 构建工具版本“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'`

0 个答案:

没有答案