Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
liuxuebing2010 opened this issue Nov 14, 2020 · 5 comments
Open

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

liuxuebing2010 opened this issue Nov 14, 2020 · 5 comments

Comments

@liuxuebing2010
Copy link

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

@nukc
Copy link

nukc commented Nov 30, 2020

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

productFlavors {
    myapp {}
}

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

strings.xml

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

@huanghongfu
Copy link

image
不生效

@nukc
Copy link

nukc commented Feb 2, 2021

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

@lumingyuan
Copy link

解决了吗?

@lilongfeng2010
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants