libs工具包結構:
activity activity基類封裝
net 網絡底層封裝
cache 資料緩存,圖檔緩存
ui 自定義控件
主項目包結構:
activity (activity下面可以按照子產品進行劃分)
adapter 所有擴充卡
entity 所有實體類
db sqlite邏輯封裝類
engine 業務相關類
utils 公用的方法
interfaces 接口
listener listener接口,以on開頭
使用fastjson注意點:
加了符号Annotation的實體屬性,使用崩潰;
當有泛型屬性,使用崩潰。
混淆檔案添加如下内容解決:
-keepattributes Signature //避免混淆泛型
-keepattributes *Annotation* //不混淆注解
<a href="http://www.xamasoft.com/json-class-generator/">http://www.xamasoft.com/json-class-generator/</a>
作者在github有放出代碼:
https://github.com/icodeu/AppProgrammingSource/blob/master/1.6%20%E7%B1%BB%E5%9E%8B%E5%AE%89%E5%85%A8%E8%BD%AC%E6%8D%A2%E5%87%BD%E6%95%B0/YoungHeart/src/com/youngheart/utils/Utils.java