Android中 一些常用的依赖

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zjc_null/article/details/80807462

依赖,在Android开发中属于常备,在此,我做了一些通用性比较高的整理我的版本比较老使用的是compile声明的,但是当你的Adnroid Studio版本较高的时候就需要使用implementation声明了

//okhttp
compile 'com.squareup.okhttp3:okhttp:3.5.0'
//引入Log拦截器,方便DEBUG模式输出log信息
compile 'com.squareup.okhttp3:logging-interceptor:3.5.0'
//gson解析
compile 'com.google.code.gson:gson:2.6.2'

//xrecyclerview
compile 'com.jcodecraeer:xrecyclerview:1.5.2'

//RecyclerView依赖
compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'

//greendao
compile 'org.greenrobot:greendao:3.2.0'
compile 'org.greenrobot:greendao-generator:3.2.2'
apply plugin: 'org.greenrobot.greendao'
//在项目工程gradle里面写
classpath 'org.greenrobot:greendao-gradle-plugin:3.2.1'
mavenCentral()

//引入retrofit
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'

//引入rxjava
compile 'io.reactivex:rxjava:1.0.14'
compile 'io.reactivex:rxandroid:1.0.1'
//引入rxjava适配器,方便rxjava与retrofit的结合
compile 'com.squareup.retrofit2:adapter-rxjava:2.0.2'
//引入json转换器,方便将返回的数据转换为json格式
compile 'com.squareup.retrofit2:converter-gson:2.1.0'

//Rxjava版本不同
implementation 'com.squareup.retrofit2:retrofit:2.1.0'
implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
implementation 'io.reactivex:rxandroid:1.2.0'
/*以上两个版本用那种都可以,或者混合使用也可以*/
//引入rxandroid
版本不同
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'

//横向滑动
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
    
//Evenbus订阅依赖
compile 'org.greenrobot:eventbus:3.0.0'

//黄油刀插件依赖 三个都需要
compile 'com.jakewharton:butterknife:8.4.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
//在项目的project 的build.gredle 文件中的dependencies标签下添加
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
//第三方自定义控件
//TabLayout
compile 'com.android.support:design:23.1.1'依赖    

//Fresco第三方加载图片框架依赖 四个依赖
compile 'com.facebook.fresco:fresco:1.3.0'
// 支持webp
compile 'com.facebook.fresco:webpsupport:1.3.0'
// gif加载使用
compile 'com.facebook.fresco:animated-gif:1.3.0'
// WebP(静态图+动图)加载使用
compile 'com.facebook.fresco:animated-webp:1.3.0' 

//glide加载图片
compile 'com.github.bumptech.glide:glide:3.7.0'

//imageloader第三方加载图片框架依赖
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'

//圆形图片框架
compile 'de.hdodenhof:circleimageview:2.2.0' 

//Banner无限轮播
compile 'com.youth.banner:banner:1.4.10'

//XBanner无限轮播
compile 'com.xhb:xbanner:1.3.0'

//第三方流式布局
compile 'com.hyman:flowlayout-lib:1.1.2'

//pulltorefresh上拉加载下拉刷新控件
compile 'com.github.userswlwork:pull-to-refresh:1.0.0'

/*两种实现底部导航栏的依赖*/
compile 'me.majiajie:pager-bottom-tab-strip:2.2.5'
compile 'com.hjm:BottomTabBar:1.1.1'

后续在整理了依赖就接着修改

猜你喜欢

转载自blog.csdn.net/zjc_null/article/details/80807462