2014-02-06 36 views
0

enter image description here我正在使用Jenkins,我使用BUILD --> INVOKE ANTS --> TARGETS --> clean debug從它得到一個debug build(apk)。現在我想從jenkins得到一個簽名的apk。我在BUILD --> INVOKE ANTS --> TARGETS --> clean release中添加了此設置。我知道這個不足以從jenkins中獲得簽名的apk版本。還有什麼我應該添加來獲得簽名APK?請幫助我。也給我一個詳細的解釋,因爲我是新手。如何在jenkins中籤署我的android項目?

這些是我添加的參數。

This is the error message for every build run in jenkin

回答

1

從詹金斯documentation

Running the build in Hudson This part is easy: create a new freestyle job and let it be build with ant. The targets that we want to execute are clean release. Release will compile, package and sign your apk. Now to get this working right, some custom properties should be set (use the Advanced button).

sdk.dir=/Users/hugo/Code/android-sdk-mac

target=Google Inc.:Google APIs:7

key.store=certs/rd-release.keystore key.alias=rainydays

key.store.password=thisisnotmypassword

key.alias.password=thisisnotmypassword

The sdk.dir should point to the Android SDK root on your Hudson node. In my case I'm running Hudson locally on my machine. The target property refers to the SDK we want to use as mentioned earlier. The key.* properties are related to signing of the apk. My strategy is to have a separate key store and private key for each application that I develop. I also check that keystore in to SVN. I also archive the *-release.apk artifact so that I can download the latest release apk directly from Hudson. After completing these steps, you should be able to build your Android app with Hudson.

您可以在文檔中查看更多的配置。

+0

我已經提到了這個文檔,我也是這樣。但仍然出現此錯誤:** E:\ Project_Stuffs \ adt-bundle-windows-x86_64-20130219 \ sdk \ tools \ ant \ build.xml:1132:執行此行時發生以下錯誤: E:\ Project_Stuffs \ adt-bundle-windows-x86_64-20130219 \ sdk \ tools \ ant \ build.xml:1144:E:\ Temp \ Jenkins \ Builds \ Sample-Project \ certs \ sample-release.keystore(系統找不到路徑指定) 總時間:7秒 構建步驟'調用Ant'標記構建爲失敗 完成:失敗** – ydnas

相關問題