Tuesday, March 1, 2016

Build variant type according to Locale

 Add below code under android--defaultConfig in build.gradle file  
 buildConfigField 'java.util.Locale', 'LOCALE_SPANISH_LATAM', 'new java.util.Locale(\"es\",\"US\")'  
 productFlavors {  
   esus{  
     applicationId 'com.praveena.test.us'  
     resConfigs 'es-rUS'  
     buildConfigField 'java.util.Locale', 'LOCALE', 'new java.util.Locale(\"es\",\"US\")'  
   }  
 }  
 By using this we can select the build variant type while running.  

No comments:

Post a Comment