By downloading the new version of the application on Google Play, the Developer Console says "69 languages ​​have been added,"

I downloaded a new version of my application when I saw this:

enter image description here

I certainly did NOT add all these languages. They are not and have never been among my values-xx folders, where strings.xml . I tried to check the APK, but there are no string resources there, I think that they were all compiled into a single file.

Is this a new Play Developer Console feature, or is it a bug in my application? Should I publish or not?

+5
source share
1 answer

This is because your application includes Android support libraries, Google Play services, or another library that provide strings for all of these languages.

You can publish the application in this state, but for languages ​​that you clearly do not support, it is possible that users can see the text in their language configured on the device in some places (for example, dialogs from Google Play Services), and not in your language by default for the application.

To ensure that only the resources for the locales you want are included in your APK, you can use resConfigs in your build.gradle , for example:

 android { defaultConfig { // Explicitly include only the languages that we support; // ignore any other resources included by library projects resConfigs 'de', 'en', 'fr' } } 

The syntax for the experimental Gradle plugin is as follows:

 model { android { defaultConfig { resourceConfigurations << 'en' << 'de' << 'zh' } } } 
+4
source

All Articles