常用的依赖包和权限

常用依赖包

RxJava与Retrofit结合的依赖

 //retrofi依赖
    compile 'com.squareup.retrofit2:retrofit:+'
    compile 'com.squareup.retrofit2:converter-gson:+'
    //Rxjava2需要依赖
    compile 'io.reactivex.rxjava2:rxjava:+'
    compile 'io.reactivex.rxjava2:rxandroid:+'
//让retrofit支持Rxjava2
    compile 'com.squareup.retrofit2:adapter-rxjava2:+'

//fresco图片加载器的依赖

//基本依赖
 compile 'com.facebook.fresco:fresco:0.12.0'
 // 在 API < 14 上的机器支持 WebP 时,需要添
   compile 'com.facebook.fresco:animated-base-support:0.12.0'
    // 支持 GIF 动图,需要添加
  compile 'com.facebook.fresco:animated-gif:0.12.0'
  // 支持 WebP (静态图+动图),需要添加
  compile 'com.facebook.fresco:animated-webp:0.12.0'
  compile 'com.facebook.fresco:webpsupport:0.12.0'

  // 仅支持 WebP 静态图,需要添加
  compile 'com.facebook.fresco:webpsupport:0.12.0'

/RxAndroid所依赖的库/
两个依赖包都得导

compile ‘io.reactivex:rxandroid:1.2.1’
compile ‘io.reactivex:rxjava:1.1.6’

//retrofit网络请求依赖

compile ‘com.squareup.retrofit2:retrofit:2.0.0-beta3’

//支持gson

compile ‘com.squareup.retrofit2:converter-gson:2.0.2’

//支持RxJava

compile ‘com.squareup.retrofit2:adapter-rxjava2:2.3.0’

//ok网络请求

compile ‘com.squareup.okhttp3:okhttp:3.9.1’

//recyclerview 与 xrecyclerview

compile ‘com.android.support:recyclerview-v7:26.0.0-alpha1’
compile ‘com.jcodecraeer:xrecyclerview:1.5.2’

//图片加载

compile ‘com.github.bumptech.glide:glide:3.6.0’
compile ‘com.nostra13.universalimageloader:universal-image-loader:1.9.5’
compile ‘com.facebook.fresco:fresco:0.12.0’

//底部栏

compile ‘com.hjm:BottomTabBar:1.1.0’

//解析gson

compile ‘com.google.code.gson:gson:2.8.1’

//轮播banner

compile ‘com.youth.banner:banner:1.4.9’

//二维码

compile ‘cn.yipianfengye.android:zxing-library:2.2’

//样式cardview

compile ‘com.android.support:cardview-v7:22.2.0’

//eventbus

compile ‘org.greenrobot:eventbus:3.1.1’

//butterknife

compile ‘com.jakewharton:butterknife:8.8.1’
annotationProcessor ‘com.jakewharton:butterknife-compiler:8.8.1’

//greendao

compile ‘org.greenrobot:greendao:3.2.2’

//Snackbar

compile ‘com.android.support:design:23.4.0’

常用权限

  1. 允许链接网络的权限
<uses-permission android:name="android.permission.INTERNET"></uses-permission>

2.获得写sd卡的权限

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>

3.获得读sd卡的权限

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"></uses-permission>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值