How to change app name per Gradle build type

前端 未结 10 875
慢半拍i
慢半拍i 2020-11-29 20:09

I am trying to figure out a way to be able to change my application\'s app name per build type in gradle.

For instance, I would like the debug version to have

10条回答
  •  悲&欢浪女
    2020-11-29 20:44

    The app name is user-visible, and that's why Google encourages you to keep it in your strings.xml file. You can define a separate string resource file that contains strings that are specific to your buildTypes. It sounds like you might have a custom qa buildType. If that's not true, ignore the qa part below.

    └── src
        ├── debug
        │   └── res
        │       └── buildtype_strings.xml
        ├── release
        │   └── res
        │       └── buildtype_strings.xml
        └── qa
            └── res
                └── buildtype_strings.xml
    

提交回复
热议问题