Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova build error "Requirements check failed for JDK 8 ('1.8.*')! Detected version: 11.0.2"

when I try to compile with ionic my application tells me the following error:

Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=undefined (recommended setting) ANDROID_HOME=/home/jmarroni/Android/Sdk (DEPRECATED) Requirements check failed for JDK 8 ('1.8.*')! Detected version: 11.0.2 Check your ANDROID_SDK_ROOT / JAVA_HOME / PATH environment variables. [ERROR] An error occurred while running subprocess cordova.

Try installing the previous version of java 1.8 but do not recognize the change.

like image 328
jmarroni Avatar asked Jun 17 '19 15:06

jmarroni


1 Answers

I’ve faced the same problem. In my case, two different JDK are installed

/usr/lib/jvm$ default-java java-1.11.0-openjdk-amd64 java-11-openjdk-amd64 java-1.8.0-openjdk-amd64 java-8-openjdk-amd64 openjdk-11

  1. sudo update-alternatives --config java
  2. sudo update-alternatives --config javac
like image 94
Fakher Saafi Avatar answered Oct 13 '22 12:10

Fakher Saafi