Gradle resValue causes duplicate string resources

前端 未结 2 1203
日久生厌
日久生厌 2020-12-31 11:21

My Android manifest file defines the app name as follows:

android:label=\"@string/app_name\"

A corresponding entry for app_name exists in r

2条回答
  •  时光取名叫无心
    2020-12-31 11:35

    Shouldn't have to mess with a 'resValue.' You can use the debug sourceset which will allow you to redefine other strings in debug as well. Create the following file and redefine the 'app_name' string in there.

    src/debug/res/values/strings.xml
    

    Just make sure you don't have anything like the following in your build.gradle's sourceSets

    debug.setRoot('build-types/debug')
    

提交回复
热议问题