SoFunction
Updated on 2025-03-11

Android Studio 3.0 Gradle configuration changes

Multi-channel packaging changes

flavorDimensions "default"
productFlavors {
  xxxx { dimension "default" }
}
 {
  flavor ->  = [CHANNEL_VALUE: name]
}

Change the package name and path

 { variant ->
  if ( == 'release') {
     { output ->
      def outputFile = 
      if (outputFile != null && ('.apk')) {
        def fileName = "${}.apk"
        outputFileName = new File("../../../apk", fileName)
      }
    }
  }
}

Summarize

The above is the Android Studio 3.0 Gradle configuration change introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to everyone in time. Thank you very much for your support for my website!