Current JDK version 1.8 has a bug that prevents Room from being incremental

When compiling, it showed me a warning:

Current JDK version has a bug ( that prevents Room from being incremental. Consider using JDK 11+ or the embedded JDK shipped with Android Studio 3.5+.Note: 1 Wrote GeneratedAppGlideModule with: [][WARN] Incremental annotation processing requested, but support is disabled because the following processors are not incremental: (DYNAMIC).

Then I downloaded JDK 8 (8u261) from the Oracle site (it requies registration, so look for a direct link).

Installed it, changed JAVA_HOME system variable to a new path:

enter image description here

Then recompiled the app. Even restart wasn't required.


After a month I again saw the same warning. Then read the accepted answer and found Java embedded with Android Studio: C:\Program Files\Android\Android Studio\jre.

File > Project Structure..., then SDK Location, and in the field JDK location wrote that path. Restarted AS.

you will need to using JDK embedded with AS to solve this. make sure to use AS 3.5 above. On project structure -> SDK location make sure jdk is pointed to jdk shipped with AS. /Applications/Android Then you will need to restart your AS.

If you running from terminal make sure $JAVA_HOME contains correct path.

I guess Android studio not supporting JDK 11 yet. I also tried to use latest JDK 8 (231, which AS 3.5 using 202) but it causing this issue.