How to use JDK 12 with Android project

Oracle Java and Android Java aren't the same - they don't even use the same virtual machine.

So Sadly u can not use it now, until Android support it.


you actually can compile Android apps using a higher JDK version while targeting Java 8 within your apps. it seems that this was supported in Android Studio versions before 3.5 beta 3, and according to the issue tracker, they plan on fixing this.

in the meanwhile, you can compile with higher JDK versions on the command line with Gradle without any issues.