简体   繁体   中英

Apache Cordova : Requirements check failed for JDK 1.8

Good day! I was trying Apache Cordova and encountered the following:

C:\Users\peepo\CordovaProjects\HelloWorld>cordova run android
Android Studio project detected
ANDROID_HOME=C:\Users\peepo\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_191
Requirements check failed for JDK 1.8

C:\Users\peepo\CordovaProjects\HelloWorld>java -version
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) Client VM (build 25.191-b12, mixed mode, sharing)

I've tried what have been suggested in Cordova : Requirements check failed for JDK 1.8 or greater

  • Uninstall JDK 1.8 versions and install only latest JDK 1.8
  • Exported JAVA_HOME in USER and/or SYSTEM variable in ENV variables

But the error persists.

Any help is appreciated. Thanks in Advance!

After few tries, I was able to find a solution.

I have a java 1.7 declared in SYS variable, I've replaced it with the java 1.8 version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM