I have tried every which way to declare JAVA_HOME in my system variables, but I keep getting the following error when running 'ionic Cordova build --release android'
Failed to run "javac -version", make sure that you have a JDK version 8 installed.
You can get it from the following location:
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Your JAVA_HOME is invalid: C:\Program Files (x86)\Java\jdk1.8.0_301
I've tried appending it with "bin", I've tried wrapping C: Program Files (x86) in double quotes, I've tried uninstalling and reinstalling java, and I always get the same error. When I run echo %JAVA_HOME% it gives me:
C:\Program Files (x86)\Java\jdk1.8.0_301
How can I figure out what's wrong?