Accepted answer

using windows and having two jdk 1.8 and 14 version something ...

Faced same issue and after some debugging find the solution.

  1. set JAVA_HOME correctly.
  2. Change the user variable PATH value with new jdk (1.8) version.
  3. Change the user variable PATH value with new jdk (1.8) version.
Accepted answer

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

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

 we needed to set the JAVA_HOME variable like so…

export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home"

sorted the problem for us at least.

Java 11 is not JDK 1.8 (now called JDK 8 I think). You need this specific version for Android tooling.

had the same problem reinstalled SDK didn’t work removed old sdk and reinstalled SDK did’t work

You need to delete the android folder form the platform folder and execute ionic run android this will reinstall the platform automatically and build from scratch. I think the cache files are the problem so that is why I think this worked.

I hope it will also work for others.

Uninstall all previous JDK including 1.8 Install JDK 1.8

faced the same issue with jdk1.8.0_201.It got resolved when I made JAVA_HOME=C:\Program Files\Java\jdk1.8.0_201 and added "C:\Program Files\Java\jdk1.8.0_201\bin" in path variable

MAC: Navigate to :/Library/Java/JavaVirtualMachines Make sure you are having only jdk1.8.0_201.jdk If you have many then remove other JDK

You have installed Java JDK version 11. For ionic cordova you need JDK 8. Read Installing the Requirements.

You can download JDK 8 here

Both:

java -version

and:

javac -version

should be Java 8. Either can be changed on Linux (Debian) by running:

sudo update-alternatives --config java

or:

sudo update-alternatives --config javac

got solution of this issue,

It mean to say that I have older version of SDK, as per new setup it need at-least SDK-1.8 to get run build of the application.

For that I downloaded new version of SDK from here.
And then updated my SDK version using this article.

After that when I run this command-

ionic run android