ant 可自動替換友盟渠道、版本號碼、包名

來源:互聯網
上載者:User

標籤:android   blog   http   io   使用   ar   檔案   art   問題   

 

可自動替換友盟渠道、版本號碼、包名

如何整合到我的項目裡

前提:瞭解android官方文檔,在項目目錄中執行ant debug能打包,比如常見的打包步驟:

android update project -p . -s -t "android-19"ant debug

如果ant debug打包能通過,則可以使用下面的自動打包。

下載custom_rules.xml,放到項目目錄(假設為Project1),然後執行:

ant auto-debug -Dversion=time

即可,產生的包在./bin/中。

如果想打release包,下載ant.properties,修改其中的密碼等配置,然後執行:

ant auto-release -DUMENG_CHANNEL=googlePlayStore -Dpackage=com.example.ant.beta

即可。

 

 

中間會出現一些問題,因為原作者是在linux上啟動並執行,所以在windows上需要修改customer_rules.xml的66行為

<exec dir="${auto.project.tmp.dir}" executable="ant.bat">

同時AndroidManifest.xml 檔案裡不要有中文,不然會報編碼問題

 

 

 

 

 

 http://blog.csdn.net/cheligeer1988/article/details/12781939   一般打包

參考:http://www.cnblogs.com/sink_cup/p/android-ant-auto-release.html      git自動替換友盟渠道、版本號碼、包名

http://blog.csdn.net/u010427035/article/details/22203825    Ant多渠道批量打包帶簽名的包

 

http://blog.csdn.net/liuhe688/article/details/6679879   詳細步驟

http://blog.csdn.net/up1up2up3/article/details/21472883  可動態修改包名

http://handsomeliuyang.iteye.com/blog/1156070

http://www.apkbus.com/android-138842-1-1.html

ant 可自動替換友盟渠道、版本號碼、包名

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.