2015-02-06 48 views
2

我在過去的幾個月中一直在爲iOS的Cordova項目工作,現在我想移動並測試Android部分。我已經嘗試過兩次安裝Android SDK,JDK,Ant,並將它們放入路徑環境變量中,但我無法讓應用程序構建。我試圖環顧其他問題,但似乎無法找到明確的答案。Cordova Android Build退出代碼8

所以,當我去打造Android平臺,這是我的錯誤:

BUILD FAILED 
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:720: The following 
error occurred while executing this line: 
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:734: Compile failed; 
see the compiler error output for details. 

Total time: 3 seconds 

C:\Users\thomas\Desktop\batapp\BatNetting\platforms\android\cordova\node_modules\q 
\q.js:126 
       throw e; 
        ^
Error code 1 for command: cmd with args: /s,/c,ant/debug/-f/C:\Users\thomas\Desktop\ 
batapp\BatNetting\platforms\android\build.xml,-Dout.dir=ant-build,-Dgen.absoule.dir= 
ant-gen 
ERROR running one or more of the platforms: Error: C:\Users\thomas\Desktop\batapp\ 
BatNetting\platforms\android\cordova\run.bat: Command failed with exit code 8 
You may not have the required environment or OS to run this project 

我真的不知道這可能是導致此。就像我說的,我已經嘗試重新安裝SDK,Java,Ant並雙重檢查路徑。首先,我嘗試從本地Git服務器上提取文件,然後刪除它們並直接從我在一直在使用的Mac VM上打開的項目中複製這些文件。我也試過使用cordova build androidionic build android,但都有相同的結果。

任何幫助將不勝感激!

更新

我試圖創造新的應用程序與離子新的應用程序,一切工作正常。我已經成功創建了一個項目,將Android作爲平臺添加,構建並運行了Android項目。所以,它似乎與已經存在的應用程序的東西似乎沒有同意我的看法。

回答

0

我其實已經想通了。我只是對我的一個插件有問題。它需要一個不在我的項目中的java庫。一旦我將該庫放入項目中,它就能夠正常生成並運行。

+8

什麼是這回答,這絕對沒有價值的社區 – 2015-03-03 19:31:00

+1

我正在使用庫調用html2pdf,它需要iText.jar,但我不知道。所以,一旦我將iText.jar添加到插件中,它就構建得很好。 – Atarinerd80 2015-03-30 18:38:42

+0

@BogdanM。其實這個答案是有價值的,因爲我面臨同樣的情況,所以很高興知道問題是什麼。 – Prabhu 2015-07-14 04:35:31

相關問題