我尝试使用 cmd 行创建一个 phonegap 应用程序,当我执行此命令时create C:\testapp com.demo.testapp testapp
收到此消息something wrong in the loop
,我调用 create.bat 文件,其中包含:
@ECHO OFF
IF NOT DEFINED JAVA_HOME GOTO MISSING
FOR %%X in (java.exe javac.exe ant.bat android.bat) do (
SET FOUND=%%~$PATH:X
IF NOT DEFINED FOUND GOTO MISSING2
)
cscript "%~dp0\create.js" %*
GOTO END
:MISSING
ECHO Missing one of the following:
ECHO JDK: http://java.oracle.com
ECHO Android SDK: http://developer.android.com
ECHO Apache ant: http://ant.apache.org
:MISSING2
ECHO something wrong in the loop
EXIT /B 1
那么如何解决 java.exe、javac.exe、ant.bat 和 android.bat 的问题,或者如何修改 create.bat 代码?!