walle icon indicating copy to clipboard operation
walle copied to clipboard

如何为不同的渠道配置不同的app名称?

Open liuxuebing2010 opened this issue 4 years ago • 5 comments

由于软著的原因,应用宝和华为必须使用和现在的app名称不同的文字

liuxuebing2010 avatar Nov 14 '20 08:11 liuxuebing2010

在目录结构 app - src 下新建一个文件夹,文件夹名必须是 productFlavors 对应的名称。 例如:

productFlavors {
    myapp {}
}

那就是 app - src - myapp - res - values - strings.xml

strings.xml

<resources>
    <string name="app_name">myapp 渠道的 app 名称</string>
</resources>

nukc avatar Nov 30 '20 01:11 nukc

image 不生效

huanghongfu avatar Feb 01 '21 02:02 huanghongfu

执行 ./gradlew aR ,outputs - apk 下会有 productFlavors 对应的渠道包,然后再自行对各个 apk 再进行渠道打包

nukc avatar Feb 02 '21 06:02 nukc

解决了吗?

lumingyuan avatar Feb 04 '21 00:02 lumingyuan

没有解决吗?找了一圈,也没有解决方案。

lilongfeng2010 avatar Oct 12 '22 06:10 lilongfeng2010