Android 依赖大集合

在Android开发过程中,除了引入第三方依赖库,还存在很多依赖,在这里就贴一下Android开发过程中常用的依赖,方便日后使用。


ImageLoader的依赖:
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'

Okhttp的依赖:
implementation 'com.squareup.okhttp3:okhttp:3.10.0'

Gson的依赖:
implementation 'com.google.code.gson:gson:2.8.5'

Glide的依赖:
implementation 'com.github.bumptech.glide:glide:3.7.0'

CircleImageView的依赖:
compile 'de.hdodenhof:circleimageview:2.2.0'

RecyclerView的依赖:
implementation 'com.android.support:recyclerview-v7:27.1.1'

ButtomTabBar的依赖:
implementation 'com.hjm:BottomTabBar:1.1.2'  

ButtomBar的依赖:
implementation 'com.roughike:bottom-bar:2.0.2'

xrecyclerview的依赖:
implementation 'com.jcodecraeer:xrecyclerview:1.3.2'

应用拦截器
implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'

Banner:
implementation 'com.youth.banner:banner:1.4.9'


Fresco的依赖:
implementation 'com.facebook.fresco:fresco:0.12.0'
支持 GIF 动图,需要添加  
 implementation 'com.facebook.fresco:animated-gif:0.12.0' 

如果Fresco还需要别的功能可以去官网查询https://www.fresco-cn.org/

Butterknife
apply plugin: 'com.jakewharton.butterknife'
implementation 'com.jakewharton:butterknife:8.4.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
classpath 'com.jakewharton:butterknife-gradle-plugin:8.4.0'

请参考https://blog.csdn.net/melect/article/details/80671080

eventbus:
implementation 'org.greenrobot:eventbus:3.0.0'

GreenDao
implementation 'org.greenrobot:greendao:3.0.1'
implementation 'org.greenrobot:greendao-generator:3.0.0'

classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2'//bulid.gradle下进行配置

生成文件进行配置

greendao {

      schemaVersion 1 //版本

      daoPackage '生成文件包名' // 一般为app包名+生成文件的文件夹名

      targetGenDir 'src/main/java' //生成文件路径

}


Rxjava、RxAndroid、Retrofit
implementation 'io.reactivex.rxjava2:rxjava:+'
implementation 'io.reactivex.rxjava2:rxandroid:+'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'

autolayout
implementation 'com.zhy:autolayout:1.3.6'

Autolayout必须在清单文件中的application中声明一个作为标准的宽高
<application>
.....
<meta-data
    android:name="design_width"
    android:value="1080" />
<meta-data
    android:name="design_height"
    android:value="1920" />
.....
</application>

猜你喜欢

转载自blog.csdn.net/Melect/article/details/81125760