Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Requirements check failed for JDK 1.8 or greater for ionic 2.1.8

I have just updated my local machine setup and now config of it is as -


******************************************************

Your system information:

Cordova CLI: 6.4.0 
Ionic CLI Version: 2.1.8
Ionic App Lib Version: 2.1.4
ios-deploy version: Not installed
ios-sim version: 5.0.8 
OS: OS X Yosemite
Node Version: v6.2.2
Xcode version: Xcode 7.2 Build version 7C68



******************************************************

Now i am getting error when i build for android (ionic build android) as-

Error: Requirements check failed for JDK 1.8 or greater

Need help!!!

like image 801
S.Yadav Avatar asked Nov 14 '16 10:11

S.Yadav


2 Answers

If you are using Ubuntu, you could do the following, too:

sudo update-alternatives --config javac

That worked for me.

For more information about installing java/javac using update-alternatives, please refer to: How do I make java default to a manually installed JRE/JDK?

like image 162
hlopezvg Avatar answered Oct 03 '22 22:10

hlopezvg


I 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 

It worked for me.

like image 38
S.Yadav Avatar answered Oct 03 '22 21:10

S.Yadav