Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova : Requirements check failed for JDK 1.8 or greater

I am using Cordova 6.4.0 in Windows 7 OS, but I get this error once I tried to build the android version :

Issue description

The Java Home variable is setted correctly to the JDK path, but I don't know why I am getting this issue. Any suggestions please ?

like image 913
MadNeox Avatar asked Nov 16 '16 09:11

MadNeox


People also ask

Which of the following version of Java is recommended for Cordova app?

Install Java Development Kit (JDK) 7 or later.


2 Answers

In Linux (Debian/Ubuntu) this can be solved by selecting a Java 1.8 SDK in

sudo update-alternatives --config javac 

Changing JAVA_HOME env variable directly does not seem to have any effect.

EDIT: responding to the comments: This probably has something to do with the fact that new Debian (and apparently Ubuntu) Java installations through the package manager do not use the JAVA_HOME enviroment variable to determine the location of the JRE. See this and this post for more info.

like image 195
oseiskar Avatar answered Oct 03 '22 07:10

oseiskar


Uninstall all previous JDK including 1.8 Install JDK 1.8

like image 43
MadNeox Avatar answered Oct 03 '22 06:10

MadNeox