欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Android Studio 3.0 Gradle 配置變更

 更新時(shí)間:2018年03月13日 16:02:36   作者:瘟疫幽魂  
這篇文章主要介紹了Android Studio 3.0 Gradle 配置變更的相關(guān)知識(shí),即多渠道打包變更和更改打包命名及路徑的代碼,感興趣的朋友跟隨腳本之家小編一起看看吧

多渠道打包變更

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

更改打包命名及路徑

android.applicationVariants.all { variant ->
  if (variant.buildType.name == 'release') {
    variant.outputs.all { output ->
      def outputFile = output.outputFile
      if (outputFile != null && outputFile.name.endsWith('.apk')) {
        def fileName = "${variant.flavorName}.apk"
        outputFileName = new File("../../../apk", fileName)
      }
    }
  }
}

總結(jié)

以上所述是小編給大家介紹的Android Studio 3.0 Gradle 配置變更,希望對(duì)大家有所幫助,如果大家有任何疑問請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!

相關(guān)文章

最新評(píng)論