androidandroid-gradle-pluginapkgradle-pluginapp-bundle

Android App Bundle, Disable Language and Density Split on Base Module or All module


I have created android app bundle and I want to disable the split apk by language and density, since ours is a huge project, and we have shared resources.

Question is, when I read both developer site and medium blog from android, they ask to add

android {
   bundle {
     density { 
       enableSplit = false
     }
     language { 
      enableSplit = false
     }
   }
}

Should we add this only in baseModule(application) build.gralde or each modules build.gradle if I have multiple feature modules.

enter image description here


Solution

  • There is no need to put it in all your gradle files. You can put it only in your app.gradle file as follow:

    android {
        compileSdkVersion project.sdk
    
        defaultConfig {
            versionCode 1
            versionName "1.0.0"
        }
    
        bundle {
            language {
                enableSplit = false
            }
        }
    }