Sinful
Sinful

Reputation: 151

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: Error message when cordova runs/builds android

JAVA_HOME ENV.

JDK setup

jdk folder

Upvotes: 1

Views: 1051

Answers (2)

Giorgi Tsiklauri
Giorgi Tsiklauri

Reputation: 11110

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.

Upvotes: 1

Sinful
Sinful

Reputation: 151

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.

enter image description here enter image description here

Upvotes: 0

Related Questions