1.问题描述
使用GreenDao出现如下异常WARNING: API ‘variant.getJavaCompiler()’ is obsolete and has been replaced with ‘variant.getJavaCompileProvider()’.
这个原因是因为你Gradle版本高或者不稳定导致的,可以通过降低Gradle版本就可以运行。
WARNING: API 'variant.getJavaCompiler()' 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.
To determine what is calling variant.getJavaCompiler(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
Affected Modules: app
如下图所示:
2. 解决方法:
将build.gradle版本降低版本就可以