我寻找了很多解决方案,但名称仍然相同:app-release.apk
android.applicationVariants.all { variant ->
variant.outputs.all { output ->
def newApkName = "Goods Tracker.apk"
outputFileName = newApkName
}
}
applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "Goods Tracker.apk"
}
}
我已经尝试了两种方法,但结果是一样的:
√ 构建构建 pp\outputs lutter-apk pp-release.apk
我认为你需要在output的属性中指定outputFileName
output.outputFileName = "Goods Tracker.apk"