gpt4 book ai didi

windows - Cordova 平台添加 : Failed to run 'java -version'

转载 作者:可可西里 更新时间:2023-11-01 10:46:02 25 4
gpt4 key购买 nike

我有下一个问题:

当我第一次运行时,cordova platform add android 产生了跟随错误

Error: ERROR : executing command 'ant', make sure you have ant installed and added to your path.

我在我的路径中安装并添加了 ant

我第二次运行 cordova platform add android 时,它说:

Error: Failed to run 'java -version', make sure your java environment is set upincluding JDK and JRE.Your JAVA_HOME variable is C:\Program Files\Java\jdk1.7.0_67Error: Command failed: Access denied.

我添加了 %JAVA_HOME%

我正在使用 Windows 8。

有什么建议吗??


更多信息...

`C:\temp\siete>cordova platform add androidCreating android project...C:\Users\user\.cordova\lib\android\cordova\3.5.0\bin\node_modules\q\q.js:126                    throw e;                          ^Error: ERROR : executing command 'ant', make sure you have ant installed and added to your path.    at C:\Users\user\.cordova\lib\android\cordova\3.5.0\bin\lib\check_reqs.js:47:27    at ChildProcess.exithandler (child_process.js:652:7)    at ChildProcess.emit (events.js:98:17)    at maybeClose (child_process.js:756:16)    at Process.ChildProcess._handle.onexit (child_process.js:823:5)Error: C:\Users\user\.cordova\lib\android\cordova\3.5.0\bin\create.bat: Command failed with exit code 8    at ChildProcess.whenDone (C:\Users\user\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:135:23)    at ChildProcess.emit (events.js:98:17)    at maybeClose (child_process.js:756:16)    at Process.ChildProcess._handle.onexit (child_process.js:823:5)`
`C:\temp\siete>cordova platform add androidCreating android project...C:\Users\user\.cordova\lib\android\cordova\3.5.0\bin\node_modules\q\q.js:126                    throw e;                          ^Error: Failed to run 'java -version', make sure your java environment is set upincluding JDK and JRE.Your JAVA_HOME variable is C:\Program Files\Java\jdk1.7.0_67Error: Command failed: Acceso denegado.    at C:\Users\user\.cordova\lib\android\cordova\3.5.0\bin\lib\check_reqs.js:62:22    at ChildProcess.exithandler (child_process.js:652:7)    at ChildProcess.emit (events.js:98:17)    at maybeClose (child_process.js:756:16)    at Process.ChildProcess._handle.onexit (child_process.js:823:5)Error: C:\Users\user\.cordova\lib\android\cordova\3.5.0\bin\create.bat: Command failed with exit code 8    at ChildProcess.whenDone (C:\Users\user\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:135:23)    at ChildProcess.emit (events.js:98:17)    at maybeClose (child_process.js:756:16)    at Process.ChildProcess._handle.onexit (child_process.js:823:5)`

最佳答案

也许你需要 JDK 1.6Java 32 位。你会说西类牙语吗? - 查看此链接:

http://www.phonegapspain.com/tutorial/como-instalar-phonegap-en-windows-7-paso-a-paso/

您好!

关于windows - Cordova 平台添加 : Failed to run 'java -version' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25269356/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com