Android Room incremental warning

Viewed 2322

A warning related to Room shows up which bothers me ...

> Task :api:kaptDevDebugKotlin
warning: Current JDK version 1.8.0_221-b11 has a bug (https://bugs.openjdk.java.net/browse/JDK-8007720) that prevents Room from being incremental. Consider using JDK 11+ or the embedded JDK shipped with Android Studio 3.5+.
[WARN] Incremental annotation processing requested, but support is disabled because the following processors are not incremental: androidx.room.RoomProcessor (DYNAMIC).

this is kapt in gradle

kapt {
    arguments {
        arg("room.schemaLocation", "$projectDir/schemas".toString())
        arg("room.incremental", "true")
        arg("room.expandProjection", "true")
    }
}

dependencies in gradle

// Room
implementation "androidx.room:room-runtime:2.2.4"
kapt "androidx.room:room-compiler:2.2.4"

I know there are some issues related to Room Processor :

  1. https://android.googlesource.com/platform/frameworks/support/+/refs/heads/androidx-master-dev/room/compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt?autodive=0%2F%2F%2F%2F%2F%2F%2F%2F

  2. https://android.googlesource.com/platform/frameworks/support/+/refs/heads/androidx-master-dev/room/compiler/src/main/kotlin/androidx/room/RoomProcessor.kt?autodive=0%2F%2F%2F%2F%2F%2F%2F

second link above mentioned that if AS upgrade to 3.5+, the warning would not shows agian.

The above JDK bug was fixed in JDK 11. The fix was also cherry-picked back into the
embedded JDK that was shipped with Android Studio 3.5+.

I am using AS 3.6.1 but the warning still exist. I have check my JDK location, it is using embedded, even I have another JDK location.

enter image description here

enter image description here

Is there any way to get rid of this warning?

0 Answers
Related