Skip to content Skip to sidebar Skip to footer

Different Resource Folders For Separate Tablet & Mobile Apks

I am building an app that has two APKs: one for tablets and the other for mobiles. The tablet version won't use the drawable of the mobile APK and vice versa. I want to do this be

Solution 1:

You can use Android Flavors for this purpose.

android {
   ...
   defaultConfig {...}
   buildTypes {...}
   productFlavors {
       tablet {
           applicationIdSuffix ".tablet"
           versionNameSuffix "-tablet"
       }
       phone {
           applicationIdSuffix ".phone "
           versionNameSuffix "-phone "
       }
   }

}

Each flavor will create separate build folders,where you can place resource files you wish to override. Here is an excellent tutorial: Mastering "Product Flavors" on Android

Solution 2:

You can achieve this, as Google play store providing support for multiple apks. You can check here for more details- Creating Multiple APKs for Different Screen Sizes

Post a Comment for "Different Resource Folders For Separate Tablet & Mobile Apks"