Android 最火的快速開發架構androidannotations配置詳解

來源:互聯網
上載者:User

標籤:android   開發架構   

       以前給大家介紹的xUtils是國內比較火的快速開發架構,但是它的註解機制不是太穩定而且註解可選也比較少,今天給大家介紹一個國外的一個架構主要專註於註解的開發,簡化Android代碼編寫,因為配置注意事項較為複雜,所以先詳細介紹一下配置:

    git官網:https://github.com/excilys/androidannotations


下載完解壓目錄如上,AndroidAnnotations是源碼工程,example是例子工程,

開啟\examples\HelloWorldEclipse,如下:


複製 compile-libs檔案夾到自己的工程根目錄,開啟libs檔案夾 複製androidannotations-api-3.0.1.jar

到自己工程的libs檔案夾下。如下:


選中自己工程 project->properties->Java build path->libraries->add jars把androidannotations-api-3.0.1.jar添加進來

如下:


開啟 Java compiler,選中enable project specific settings 設定compiler compliance level 1.6以上,如下:


接著選中annotation processing選中enable annotation processing,如下:


接著展開annotation processing選中factory path->add jars 把compile-libs下的androidannotation-xxx.jar添加進來。如下:


androidannotation-xxx.jar是工程編譯檔案,androidannotations-api-3.0.1.jar是api調用檔案。

注意事項:

若需要混淆打包請在proguard-project.txt添加:-dontwarn org.springframework.**

如有問題請留言,轉載註明出處。


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.