Cant generate APK

This is what I’m trying to do:

$ cordova build --release android
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_131
Error: Requirements check failed for JDK 1.8 or greater

I already tried setting up with the \bin but still can’t generate the APK :frowning:

So for you having this problem, this is the ultimate guide:

Type: where java in your cmd. If you see two locations or you see one that points to 1.7 or older versions, you need to change that in your path!

The result should be something like this:

$ where java
C:\Program Files\Java\jdk1.8.0_131\bin\java.exe

NOTE: Note that it should be the JDK not the JRE.
NOTE 2: If you dont know how to change your path, learn here