I wanted to launch the commands:
ionic build android
either
ionic run android --device
but it always throws me this error:
Error: Requirements check failed for JDK 1.8 or greater
the version of java that I have is 1.8.0_111, I have the environment variables defined, but I don't know why it gives me this error. I downloaded the jdk again to see if that would solve the error as I read it on other pages and I have the android sdk so I have no idea why the error.
I did the following, I ran:
I got two:
Version 1.8 was correctly selected
So I ran:
,
javac
no !java
(The compiler)Only the jdk1.7..../javac alternative existed .
I searched how to install a new alternative and it is done like this (the last parameter will surely be different in each case):
Then I ran:
So, I selected the newly installed alternative, and now I was able to generate the APK !
I assume you have JDK 8 but have installed an additional JRE on another version. Consider that the JDK already includes a JRE.
Two possible solutions:
Take a look at this link that may help you.