Running Android emulator from Ionic

560 Views Asked by At

I am trying to run an Android emulator in my mac from the Ionic project through the command prompt. I have all setup of the android studio and its running well. However, when I try to generate the emulator I am unable to do it from the ionic terminal project. I am thrown with the following errors.

Cordova build android Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=/Users/mac/Library/Android/SDK (recommended setting) ANDROID_HOME=/Users/mac/Library/Android/SDK (DEPRECATED) Requirements check failed for JDK 8 ('1.8.*')! Detected version: 14.0.1 Check your ANDROID_SDK_ROOT / JAVA_HOME / PATH environment variables. [ERROR] An error occurred while running subprocess Cordova.

1

There are 1 best solutions below

0
Durga Vundavalli On

Cordova Android works with java 1.8. You seem to have a higher version installed in your system.

Try to installing Java 1.8 and set the JAVA_HOME to java 1.8. This link could help you: Cordova : Requirements check failed for JDK 1.8 or greater