def outputPathName = "/Users/user/Downloads/test.apk"
applicationVariants.all { variant ->
variant.outputs.each { output ->
//开始输出
output.outputFile = new File(outputPathName)
}
}
def outputPathName = "/Users/user/Downloads/test.apk"
applicationVariants.all { variant ->
variant.outputs.each { output ->
//开始输出
output.outputFile = new File(outputPathName)
}
}
本文标题:gradle制定apk输出路径
本文链接:https://www.haomeiwen.com/subject/jrjgdxtx.html
网友评论
if (variant.buildType.name.equals("release")) {
//设置apk输出路径
variant.getPackageApplication().outputDirectory = new File(project.rootDir.absolutePath + "/apks")
}
}