0

长期以来,我一直在尝试将 sencha touch 2.1 和 phonegap 集成,但没有成功。几天前,我发现了“Sencha Cordova Builder - PhoneGap 项目的自动化构建”。我按照所有说明将 sencha touch 与 phonegap 集成,安装了 JDK、android SDK、ant 和 adb。问题是,当我尝试构建包时,出现以下错误:

[ERR]           com.sencha.exceptions.BasicException: The following error occurred while executing this line:
C:\wamp\www\testbuilder\build.xml:9: Execute failed: java.io.IOException: Cannot run program "ant": CreateProcess error=2, The system cannot find the file specified

但是安装了 ant,当我ant在控制台上键入时,我收到以下消息:

build file :build.xml does not exist 
build failed 

请帮我解决这个问题。

谢谢你们

4

1 回答 1

1

如果ant在 Windows 命令行中键入会发生什么?对我来说,听起来 ANT 的路径未设置为 Windows 环境路径。

检查以下指南,尤其是底部的第 3B 节:http: //docs.phonegap.com/en/2.4.0/guide_getting-started_android_index.md.html#Getting%20Started%20with%20Android

引用: Finally, you may need to include %ANT_HOME%\bin to your PATH as well. To check to see if this is required, run a command prompt and type ant. If the program can not be found add %ANT_HOME%\bin to the PATH. You may need to specify the full path instead of using the %ANT_HOME% environment variable.

编辑:您实际收到的消息是正确的,请参阅下面的评论以进行更正。

于 2013-02-22T14:01:46.017 回答