I have just started using android development and trying to use Room library. Since yesterday I am facing this warning message
w: [kapt] Incremental a
I'm using AndroidX, but It guess it's the same for android.arch.lifecycle
. For me it simply helped replacing this:
kapt "androidx.lifecycle:lifecycle-compiler:$lifecycle_version"
... with this:
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
So if you're using android.arch.lifecycle
it might have the same effect replacing this:
kapt "android.arch.lifecycle:compiler:$lifecycle_version"
... with this:
implementation "android.arch.lifecycle:common-java8:$lifecycle_version"
Be aware that this only works if you're using Java 8 and that you also should remove OnLifecycleEvent annotations for LifecycleObserver classes and let those observers implement DefaultLifecycleObserver instead.
Changing to this method is also recommended in the build.gradle
depencies shown here.