报错详细信息如下
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 a stack trace.
原因
参考这这篇文章和GreenDao的官方团队回答判断,应该是GreenDao框架引起的问题。
https://github.com/greenrobot/greenDAO/issues/942
解决方法
在Module的build.gradle里把针对GreenDao配置的targetGenDir注释掉即可,
不让其生成GreenDao文件到指定路径,而是生成到build文件夹,并且需要将之前targetGenDir路径下自动生成的文件删除,删除之后默认生成的文件路径为:module—》build—》generated—》sourse—》greendao