我正在尝试使用以下代码自定义构建过程
android.applicationVariants.all { variant ->
def appName = "MyApplication.apk"
variant.outputs.each { output ->
output.outputFile = new File(output.outputFile.parent, appName)
}
}
但是从 android studio 3.0 开始,它无法正常工作,我遇到了错误
错误:(81, 0) 不再支持 getMainOutputFile。如果您需要确定输出的文件名,请使用 getOutputFileName。