Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android DataBinding KAPT Incremental Support

I've looked at this answer and others on this site and using Google, but I have yet to find an answer that works for this problem. This is the remaining non-incremental annotation processor that is listed by the newest version of KAPT:

Incremental annotation processing requested, but support is disabled because the following processors are not incremental: android.databinding.annotationprocessor.ProcessDataBinding (NON_INCREMENTAL)

Please note that I have migrated to AndroidX and am using AGP 3.4.1 (cannot upgrade to AGP 3.5.x) and Gradle 5.5. Any help would be much appreciated.

like image 347
flaw600 Avatar asked Oct 09 '19 22:10

flaw600


1 Answers

cannot upgrade to AGP 3.5.x

That is going to be a problem. Quoting Google:

I am pleased to inform that data binding has become incremental, starting with AGP 3.5.0-alpha05. For safety we've put this feature behind a flag, currently off by default. To enable it, please set android.databinding.incremental=true in the Gradle properties file.

If you jump all the way to AGP 3.6.x (currently in alpha), incremental compilation is enabled by default.

However, on your version, AFAIK, incremental compilation support simply did not exist for the databinding stuff.

like image 143
CommonsWare Avatar answered Nov 16 '22 06:11

CommonsWare