android 常用库笔记

一、网络通信

  •    andriod-async-http  :自动对gzip解码,实现快速请求响应,多种形式响应解析有原生对字节流、String、JSON对象。

                                              缺点 android 的高版本底层库支持

  •    okHttp     低网络尤佳,Http初始化握手失败后,会降级使用TSL1.0尝试初始化连接。依赖okio和okhttp两个Jar包。

                         是众多使  用推荐优先使用的 etrofit与picasso一样都是在okhttp基础之上做的封装

  •    Volley      引用 compile 'com.mcxiaoke.volley:library:1.0.19'
  •    Retorfit    要求服务器API借口遵循REST规范,使用GSON作为JSON解析器

    andriod-async-http  Volley Retorfit 是基于HttpURLConnection、Apache HttpClient和OkHttp封装的网络请求

    https://www.jianshu.com/p/bf2f2a7aac9a

    https://blog.csdn.net/LVXIANGAN/article/details/88412867

 

二、图片缓存和显示

  •        BitmapFun   
  •        Picasso
  •        Glide
  •        Fresco
  •        Android-Universal-Image-Loader
  •       SmartImageView

对于严重依赖图片缓存的APP来说优先选择Fresco

一般来说推荐使用Glide:

     implementation 'com.github.bumptech.glide:glide:4.4.0'

    annotationProcessor 'com.github.bumptech.glide:compiler:4.4.0'

    implementation 'jp.wasabeef:glide-transformations:2.0.2'

 <uses-permission android:name="android.permission.INTERNET" />
Glide.with(this).load(url).into(imageView);

https://www.jianshu.com/p/791ee473a89b

https://blog.csdn.net/xxdw1992/article/details/93624487

三、日志

    timber+Logger+LogUtils

四、JSON解析

  •  gson Google出品
  •  jackson
  •  Fastjson  阿里出品 

       https://mvnrepository.com/artifact/com.alibaba/fastjson

      如果本地后台 maven加入过,注意版本一致,否则会报错

  •  LoganSquare 

五、数据操作

  •   ActiveAndroid
  •   ormlite
  •   greenDAO
  •    Realm

https://www.2cto.com/kf/201802/718495.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值