简体   繁体   中英

Cordova android run/build Error - Requirements check failed for JDK 1.8

I have built my cordova app and getting "Requirements check failed for JDK 1.8" error message.

Uninstalling all java and installing jdk 1.8 not solved my problem.

D:\\xampp\\htdocs\\aware>cordova run android Android Studio project detected ANDROID_HOME=C:\\Users\\Baha\\AppData\\Local\\Android\\Sdk JAVA_HOME=C:\\Program Files\\Java\\jdk1.8.0_221 Requirements check failed for JDK 1.8

ScreenShots: cordova 运行/构建 android 时的错误消息

JAVA_HOME 环境。

JDK设置

jdk文件夹

You might have installed more than one Java (binaries) on your system. First of all, check this, by executing where java command in your cmd.exe (command line).

  1. Most likely, you will see more than one java.exe installed, and if so, this may be the reason, despite installing new Java, your system still provides one more other version of it;
  2. Even if you have set your %JAVA_HOME% environment variable accordingly, there might be another java.exe available in your environment, either because of having some other Java binaries' bin folder added in the System variables' (under Environment Variables) Path variable, or because of having it at some other place, which is also available through any other environment variable (for instance: System32 on Windows).

Check where java and see your Path environment variable under the System Variables.

My problem solved partially, I have changed the path and try to build with vs code, it works, but phpstorm still not build my app.

在此处输入图片说明 在此处输入图片说明

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