I tried to run ionic build android in windows cmd and got the error message:
我试图在Windows cmd中运行ionic build android并收到错误消息:
"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"
我已经将Java_Home环境变量设置为“C:\ Program Files \ Java \ jdk1.8.0_40”
How do I resolve this?
我该如何解决这个问题?
1 个解决方案
#1
0
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.
确保在新的控制台窗口中,echo%JAVA_HOME%的输出实际上是“C:\ Program Files \ Java \ jdk1.8.0_40”,因此您知道环境变量的更改是否有效。
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.
如果更改环境变量,则不会更新已打开的控制台窗口以反映您的更改。始终打开一个新的控制台窗口。
#1
0
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.
确保在新的控制台窗口中,echo%JAVA_HOME%的输出实际上是“C:\ Program Files \ Java \ jdk1.8.0_40”,因此您知道环境变量的更改是否有效。
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.
如果更改环境变量,则不会更新已打开的控制台窗口以反映您的更改。始终打开一个新的控制台窗口。