2016-04-21 69 views
1

我正在Kony Studio中做一個演示項目。在運行Android應用程序時,我總是得到Ant build errorAnt build error = exec-shell returned:1

請檢查錯誤日誌,

-post-package: 
[exec-shell] 
[exec-shell] /Users/mac/Library/Android/sdk/tools/ant/build.xml:1037: The following error occurred while executing this line:-do-debug: 
[exec-shell] 
[exec-shell] [zipalign] Running zip align on final apk... 
[exec-shell] /Users/mac/Library/Android/sdk/tools/ant/build.xml:1039: The following error occurred while executing this line: 
[exec-shell] /Users/mac/Library/Android/sdk/tools/ant/build.xml:336: Execute failed: java.io.IOException: Cannot run program "/Users/maca/Library/Android/sdk/tools/zipalign" (in directory "/Users/mac/KonySampleApps/temp/DisplayText/build/luaandroid/dist/DisplayText"): error=13, Permission denied 
[exec-shell] at java.lang.ProcessBuilder.processException(ProcessBuilder.java:478) 

日誌說,有是文件權限問題,但我給兩個讀/寫權限,即使沒有運氣,我使用MacBookPro。幫我解決這個問題。提前致謝。從this

回答

-1

得到解決嘗試在環境變量設置變量ANT_HOME,並將其指向您的科尼螞蟻文件夾和路徑變量,將路徑添加到Ant箱。

Setting environment variables in OS X?

重新啓動系統並嘗試一個乾淨的構建。希望能幫助到你。

+1

請編輯你的答案,所以它是明確的,而不是提供一些參考。 – Farside

0

檢查/Users/maca/Library/Android/sdk/tools/zipalign是否存在並且是可執行的。 Google經常會移動zipalign(以及其他工具)。

如果缺少從/Users/maca/Library/Android/sdk/build-tools/…複製一個(最新)到/Users/maca/Library/Android/sdk/tools