android配置打包名稱

增加以下代碼applicationVariants.all { variant ->
    variant.outputs.each { output ->
        def outputFile = output.outputFile
        if (outputFile != null && outputFile.name.equals('app-debug.apk')) {
            def fileName = outputFile.name.replace("app-debug.apk", "name.apk")
            output.outputFile = new File(outputFile.parent, fileName)
        }
    }
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章