I tried to run ionic build android in windows cmd and got the error message:
"Your Java_Home is invalid : C:\Program Files\Java\jdk1.8.0.40\bin"
I already set Java_Home environment variable to "C:\Program Files\Java\jdk1.8.0_40"
How do I resolve this?
Make sure that in a new console window the output of echo %JAVA_HOME%
is really "C:\Program Files\Java\jdk1.8.0_40"
so you know your changes of the environment variables are in effect.
If you change environment variables, those console windows that are already open are not updated to reflect your changes. Always open a new console window then.