Strange issue with JDK installed

Hi all,
I changed notebook and reinstalled all tools required for my work.

When I try to build my ionic app I receive this error:

ANDROID_HOME=C:\Users\xxxxxx\AppData\Local\Android\sdk
JAVA_HOME=C:\tools\java\jdk-12.0.2
Requirements check failed for JDK 1.8 or greater
CordovaError: Requirements check failed for JDK 1.8 or greater

I already installed JDK 12

echo %JAVA_HOME%
C:\tools\java\jdk-12.0.2
java --version
java 12.0.2 2019-07-16
Java(TM) SE Runtime Environment (build 12.0.2+10)
Java HotSpot(TM) 64-Bit Server VM (build 12.0.2+10, mixed mode, sharing)

I don’t understand the issue.

Thanks
L

cordova-android requires Java 8, it does not currently work with newer versions.

See here for details:

https://cordova.apache.org/docs/en/latest/guide/platforms/android/#java-development-kit-jdk

1 Like