2013-02-22 44 views
0

很長一段時間,我試圖將sencha touch 2.1和phonegap整合在一起,但沒有成功。 幾天前,我發現了「Sencha Cordova Builder - PhoneGap項目的自動構建」。我做了所有的指示,將sencha touch和phonegap,安裝的JDK,android SDK,ant和adb集成在一起。 問題是,當我嘗試建立包,我得到以下錯誤:sencha觸摸+手機一體化

[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

build file :build.xml does not exist 
build failed 

請幫我解決這個問題。

謝謝大家

回答

1

,如果你在Windows命令行中鍵入ant會發生什麼?對我來說,聽起來像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.

編輯: 你真正得到的信息是正確的,請參閱下面我的意見進行整改。

+0

當我在命令行鍵入ant時,我得到以下 – user1830819 2013-02-22 16:36:09

+0

當我在命令行中鍵入ant時,我得到以下:構建文件:build.xml不存在 構建失敗我的路徑:C:\ Users \ mkhanduqji \ bin \ Sencha \ Cmd \ 3.0.0.250;%SystemRoot%\ system32;%SystemRoot%;%SystemRoot%\ System32 \ Wbem;%SYSTEMROOT%\ System32 \ WindowsPowerShell \ v1.0 \; C:\ Program Files \ Lenovo \ Bluetooth Software \; C:\ Program Files(x86)\ Windows Live \ Shared; C:\ java \ ant \ bin; C:\ Program Files(x86)\ Android \ android-sdk \ tools; C:\ Program文件(x86)\ Android \ android-sdk \ platform-tools; C:\ Program Files \ Java \ jdk1.7.0_15 \ bin – user1830819 2013-02-22 16:42:46

+0

啊,我把你的第一篇文章弄錯了。這是您在輸入'ant'時應該得到的消息,並且沒有提供或可以找到構建文件。所以你螞蟻安裝就好了。 你可以發佈C:\ wamp \ www \ testbuilder \ build.xml文件的內容嗎?那裏可能有錯誤的路徑/位置? – Raxr 2013-02-22 20:44:14