Error: Requirements check failed for JDK 8 (‘1.8.*’)! Detected version: 12.0.1

I have faced this “Requirements check failed for JDK 8” error in Ionic Studio when I tried to run my newly created Ionic App in Android Device. The exact error was the following.

Requirements check failed for JDK 8 ('1.8.*')! Detected version: 12.0.1
Check your ANDROID_SDK_ROOT / JAVA_HOME / PATH environment variables.

Requirements check failed for JDK 8


This error happens because of the difference between the already installed version of JDK and what Cordova required to build the App. In my case the already installed JDK version is 12.0.1. and Cordova required JDK 8.


As it’s clear from the above reason, we need to install JDK 8 to run Ionic App successfully. We don’t need to uninstall the previously installed JDK version, we can keep both versions.

1. Download & Install JDK 8 from Oracle official Website.

2. Set JAVA_HOME environment variables to the JDK 8.

In Mac, run the following command to set environment variables.

touch ~/.bash_profile; open ~/.bash_profile

The above command will open your Text Editor with .bash_profile file. Add the following lines in this file. Don’t forget to change the paths according to your save locations of JDK 8 and Android SDK. In the following code, I’ve added the default paths.

 export JAVA_HOME;

3. Save the .bash_profile file and Quit (Command + Q) in Text Editor.

4. Run command source ~/.bash_profile

Now close your terminal and rebuild the project. And the “Requirements check failed for JDK 8” error should be fixed. If you still face any problem, feel free to ask in the comments section. 🙂

You can also find other useful helping articles, code snippets and tutorials in our Coding Articles & Tutorials Knowledge Base.

Please share this post:
Native Mobile Application Developer (Android + IOS) having experience in Java, Swift, Kotlin, Objective C, Unity, C#, C/C++, NODE JS & PHP.

2 thoughts on “Error: Requirements check failed for JDK 8 (‘1.8.*’)! Detected version: 12.0.1

  1. Do you have a spam issue on this site; I also am a blogger, and I was wanting to know your situation; we have developed some nice procedures and we are looking to exchange techniques with others, please shoot me an email if interested.

  2. Hi Good Article,
    I follow your steps but again i’m receiving same error only, please find my error below

    ANDROID_SDK_ROOT=undefined (recommended setting)
    ANDROID_HOME=/Users/administrator/Library/Android/sdk (DEPRECATED)
    Requirements check failed for JDK 8 (‘1.8.*’)! Detected version: 14

    — Path is —–

    export JAVA_HOME;
    export ANDROID_HOME;
    export ANDROID_SDK_ROOT;
    export PATH=”/Users/administrator/Library/Android/sdk/platform-tools”

    export ANDROID_AVD_HOME=~/.android/avd

    export PATH=$PATH:/opt/gradle/gradle-4.1/bin

Ask a Question

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

%d bloggers like this: