离子构建android:错误:无法运行“java -version”

时间:2016-06-11 16:15:59

标签: android cordova ionic-framework sdk

windows 10

离子1.7.15

请帮帮我

离子构建android

java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b15)
Java HotSpot(TM) Client VM (build 25.91-b15, mixed mode, sharing)


Error: Failed to run "java -version", make sure that you have a JDK installed.
You can get it from: http://www.oracle.com/technetwork/java/javase/downloads.
Your JAVA_HOME is invalid: C:\Program Files (x86)\Java\jre1.8.0_91

1 个答案:

答案 0 :(得分:0)

JAVA_HOME环境变量应该设置为java jdk安装路径文件夹而不是jre安装路径。根据您的错误跟踪,您的java主目录设置为jre路径,这可能是问题