Can't built my Cordova project


cordova build Android

makes this error

ANDROID_HOME=/Users/mohsen/Library/Android/sdk JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home Error: Requirements check failed for JDK 1.8 or greater

I installed Android SDK and latest version of JDK however it still makes this error

my OS is mac (versions 10.13.2)


You have this problem because the path is still pointing to an old version of JDK. You need to go into android studio and change your path to jdk 1.8


when I write java -version on the terminal
this is the output

java version "9.0.1"
Java™ SE Runtime Environment (build 9.0.1+11)
Java HotSpot™ 64-Bit Server VM (build 9.0.1+11, mixed mode)


JDK 9 is not yet supported: