Remove Unused Locations from APK

For an Android app without localization (default only), how can you exclude localization from Gradle dependencies?

Reference Information. The application is a business application for which the only language that needs support is English English. The app includes com.google.android.gms:play-services-gcm:7.0.0 to support push notifications. The GCM library includes localization in 73 languages. I would prefer that they were not included. This reduces the APK. In addition, if the user works with non-English, I do not want this experience to be a combination of English and localized text.

+5
source share
1 answer

In build.gradle add resConfigs to restrict languages:

 android {  defaultConfig {    // other configuration here    resConfigs "en"  } } 
+9
source

Source: https://habr.com/ru/post/1216352/


All Articles