更新至Android Studio 3.3 gradle 4.10.1,烦人的提示
WARNING: API 'variantOutput.getPackageApplication()' is obsolete and has been replaced with 'variant.getPackageApplicationProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variantOutput.getPackageApplication(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
Affected Modules: app
修改前
android.applicationVariants.all { variant ->
variant.outputs.all { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.apk')) {
outputFileName = "亚博在线客服" + "-v" + defaultConfig.versionName + ".apk"
}
}
修改后
android.applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "亚博在线客服-v${variant.versionName}.apk"
}
}
这样就不会有提示了!
网友评论