问题:WARNING: API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()'. It will be removed at the end of 2019. For more information, see https://d.android.com/r/tools/task-configuration-avoidance Affected Modules: app
解决方案:
在gradle.properties 添加:
android.debug.obsoleteApi=true
本文解决了一个常见的Gradle警告问题,即'variant.getJavaCompile()'API已过时,即将在2019年底移除。通过在gradle.properties文件中添加一行代码:android.debug.obsoleteApi=true,可以避免此警告。
3086





