在Android 4.0(ICS)上安裝並測試我們的應用程序後,安裝Android SDK工具修訂版本14(ant版本1.8.2進行ant -version時)後,我注意到我們的自動構建腳本現在失敗了。構建腳本正在執行一個ant命令來構建apk,它在修訂更新後抱怨build.xml文件已過期,並執行ant更新項目-p來解決此問題。我們的項目有一個頂級項目和兩個它引用的庫項目,所有這些都是在IntelliJ中開發的。刪除舊的build.xml文件後,我在每個項目文件夾中運行了update project命令。現在,我得到了以下信息:將Android SDK工具更新至修訂版本14後出現Ant問題
<SDK_DIR>/tools/ant/build.xml:466: The following error occurred while executing this line:
<SDK_DIR>/tools/ant/build.xml:539: The following error occurred while executing this line:
<SDK_DIR>/tools/ant/build.xml:568: null returned: 1
我已經包括主體工程和庫項目下面的代碼build.xml文件(同一個):
<?xml version="1.0" encoding="UTF-8"?>
<project name="LaunchActivity" default="help">
<loadproperties srcFile="local.properties" />
<property file="ant.properties" />
<loadproperties srcFile="project.properties" />
<fail
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
unless="sdk.dir"
/>
<import file="${sdk.dir}/tools/ant/build.xml" />
</project>
隨着新project.properties文件(如下圖): AppMain(非庫項目):
android.library.reference.1=../Common
android.library.reference.2=../facebook
# Project target.
target=Google Inc.:Google APIs:8
通用(庫項目):
android.library=true
# Project target.
target=Google Inc.:Google APIs:8
的Facebook(庫項目):
android.library=true
# Project target.
target=Google Inc.:Google APIs:8
尋找一種方法來找出在錯誤信息和/或在得到這個運行問題的行號什麼的。我還有一個build.properties文件,我已經包含在AppMain build.xml文件中,用於指定用於創建簽名apk的key.store key.alias值,我假設我可以在添加到build.xml後添加到build.xml中這個問題已解決。
+1爲螞蟻構建日誌文件的想法 – oak