简体   繁体   English

更改Android项目中每种口味的启动器图标和名称

[英]Change launcher icon and name for each flavour in Android Project

I will have four flavours in my app each flavour will have a different name and launcher icon. 我的应用程序中将有四个样式,每个样式将具有不同的名称和启动器图标。 My question is, how do I achieve this? 我的问题是,我该如何实现?

I found this which actually answers my question. 我发现实际上回答了我的问题。 However, I have alot of assets in my app and I don't want to have to duplicate my res folder four times for a string and an icon, this seems very inefficient. 但是,我的应用程序中有很多资产,并且我不想为字符串和图标重复四次res文件夹,这似乎效率很低。

Is there a more efficient method of doing this? 有更有效的方法吗?

Flavour specific resource folders are applied on top of the main one. 特定于风味的资源文件夹应用在主文件夹的顶部。 You could keep all the common assets in the main res directory and put the launcher icon and a strings file containing only the app name in the flavoured directories. 您可以将所有常见资产保留在主res目录中,然后将启动器图标和仅包含应用程序名称的字符串文件放置在调味目录中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM