依赖文档

Android编程可能用到的依赖

  • 1
//Gosn依赖
implementation 'com.google.code.gson:gson:2.6.2'
//图片依赖
implementation 'com.github.bumptech.glide:glide:3.7.0'
//侧滑菜单依赖
implementation 'com.android.support:design:28.0.0'
//RecyclerView依赖
implementation 'com.android.support:recyclerview-v7:28.0.0'

//搜索框
implementation 'com.miguelcatalan:materialsearchview:1.4.0'
//日历
implementation 'com.github.prolificinteractive:material-calendarview:1.4.3'
//jsoup 解析html数据
implementation 'org.jsoup:jsoup:1.11.3'
//粘性头部/悬浮头部
implementation 'com.github.qdxxxx:StickyHeaderDecoration:1.0.1'

//轮播图
//最新版本
implementation 'com.youth.banner:banner:1.4.10'  
//glide图片加载框架
implementation 'com.github.bumptech.glide:glide:3.7.0'

//Tablayout依赖
implementation 'com.android.support:design:28.0.0'

//xRecyclerView
implementation 'com.jcodecraeer:xrecyclerview:1.5.9'
//补充XRecyclerView(单独导Xrecycler时必须导这个)
implementation 'com.android.support:design:28.0.0'


 //SmartRefreshLayout
    implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0-alpha-21'
    implementation 'com.scwang.smartrefresh:SmartRefreshHeader:1.1.0-alpha-21'//没有使用特殊Header,可以不加这行
//    可以不加这行
implementation 'com.android.support:appcompat-v7:26.1.0'//版本 23以上(必须)

 app:srlAccentColor="#00000000"
 app:srlPrimaryColor="#00000000"
 app:srlEnableAutoLoadMore="true"


//OKHttp依赖
implementation 'com.squareup.okhttp3:okhttp:3.11.0'

implementation 'com.squareup.retrofit2:retrofit:2.4.0'//Retrofit依赖
implementation 'com.squareup.retrofit2:converter-gson:2.4.0' // 可选依赖,解析json字符所用


//CardViwe卡片
implementation 'com.android.support:cardview-v7:28.0.0'

//图片(圆形,矩形)依赖
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'

//RXjava依赖
implementation "io.reactivex.rxjava2:rxjava:2.1.3" // 必要rxjava2依赖
implementation "io.reactivex.rxjava2:rxandroid:2.0.1" // 必要rxandrroid依赖,切线程时需要用到

//RXJava+Retrofit结合依赖
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0' // 必要依赖,解析json字符所用
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0' // 必要依赖,和Rxjava结合必须用到,下面会提到
implementation "io.reactivex.rxjava2:rxjava:2.1.3" // 必要rxjava2依赖
implementation "io.reactivex.rxjava2:rxandroid:2.0.1" // 必要rxandrroid依赖,切线程时需要用到

//ButterKnife依赖
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'

//EventBus依赖
implementation 'org.greenrobot:eventbus:3.1.1'

//Fresco依赖
implementation 'com.facebook.fresco:fresco:1.12.1'

//MapView依赖
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'


//依赖冲突
androidTestImplementation('com.android.support:support-annotations:27.1.1') {
    force = true
}
//版本冲突
configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == 'com.android.support') {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion '27.1.1'
            }
        }
    }
}





//沉浸式
android:fitsSystemWindows="true"
style中加:
<!--透明状态栏-->
<item name="android:statusBarColor">#00ffffff</item>

//SD卡路径
/storage/emulated/legacy

  • 2

    //kotlin 在项目目录下:
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

    //AgentWeb
    api 'com.just.agentweb:agentweb:4.0.3-alpha@aar' // (必选)
    //侧滑删除按钮
    implementation 'com.yanzhenjie:recyclerview-swipe:1.1.4'
    //改变状态栏
    implementation 'com.jaeger.statusbarutil:library:1.5.1'
    //三方缩放图片
    implementation 'com.bm.photoview:library:1.4.1'
    //图片变换的依赖
    implementation 'jp.wasabeef:glide-transformations:3.3.0'
    //纵向tab栏
    implementation 'q.rorbin:VerticalTabLayout:1.2.5'
    //饺子播放器
    implementation 'cn.jzvd:jiaozivideoplayer:6.2.3'
    //三方框架ok
    implementation 'com.zhy:okhttputils:2.6.2'

  • 3
//EvenBus
    implementation 'org.greenrobot:eventbus:3.1.1'
    //图片变换的依赖
    implementation 'jp.wasabeef:glide-transformations:3.3.0'
    //向上滑动抽屉
    implementation 'com.yinglan.scrolllayout:scrolllayout:1.0.2'
    //拼音 文字转 字母
    implementation 'com.belerweb:pinyin4j:2.5.0'
// VerticalTabLayout的使用(纵向tab栏)
    implementation 'q.rorbin:VerticalTabLayout:1.2.5'

//搜索框
    implementation 'com.miguelcatalan:materialsearchview:1.4.0'

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。