Keep all regional resources for a language when using resConfigs

Viewed 196

The article suggests resConfigs as one of the ways to reduce app size, but resConfigs seem to exclude the region-specific localizations unless the region is explicitly listed too. I would expect it to keep regional resources by default for a specified language, since for ex. 'en' resources could be matched and used on an en-GB device, 'en' is essentialy an 'en-anyregion' specifier.

Is there a way to exclude unneeded localizations, while keeping regional variations for the needed ones?

1 Answers

You need to define every language and region, like this:

defaultConfig {
    resConfigs "pt", "pt-rBR","zh-rCN","zh-rTW"
}
Related