2019-08-20 常用各种依赖

GreenDao的配置

//project里的设置
repositories {
        google()
        maven { url "https://jitpack.io" }
        maven { url "https://mvnrepository.com" }
        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
        maven { url 'http://maven.oschina.net/content/groups/public/' }
        jcenter()
        mavenCentral()
    }

dependencies {
     classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2'
}
//module里的设置
apply plugin: 'org.greenrobot.greendao'

android {
     greendao {
        //数据库版本号
        schemaVersion 1
        //生成的DAO,DaoMaster和DaoSession的包路径。默认与表实体所在的包路径相同
        daoPackage 'com.example.xts.greendaodemo.db'
        //生成源文件的路径。默认源文件目录是在build目录中的(build/generated/source/greendao)
        targetGenDir 'src/main/java'
    }
}

//greendao数据库依赖
    implementation 'org.greenrobot:greendao:3.2.2'
    implementation 'org.greenrobot:greendao-generator:3.2.2'

Jsoup html解析

//jsoup
implementation 'org.jsoup:jsoup:1.11.3'

Banner轮播图

implementation'com.youth.banner:banner:1.4.10'//滑动框

Glide图片加载

implementation 'com.github.bumptech.glide:glide:4.9.0'    //图片加载框架
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'    //图片加载框架注解处理器

fresco图片加载

implementation 'com.facebook.fresco:fresco:2.0.0'//注意版本

SmartRefreshLayout

implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0-andx-16'   //SmartRefreshLayout
implementation 'com.scwang.smartrefresh:SmartRefreshHeader:1.1.0-andx-16'

RecyclerView、XRecyclerView、卡片布局、design

implementation 'com.android.support:recyclerview-v7:28.0.0'//RecyclerView
implementation 'com.jcodecraeer:xrecyclerview:1.5.9'//XRecyclerView
implementation 'com.android.support:cardview-v7:28.0.0'//卡片布局
implementation 'com.android.support:design:28.0.0'//样式 滑动等

Retrofit和RxJava

//Retrofit
implementation 'com.squareup.retrofit2:converter-gson:2.6.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.6.0'
//RxJava
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'io.reactivex.rxjava2:rxjava:2.2.10'

implementation 'com.squareup.okhttp3:logging-interceptor:3.4.1'

纵向TabLayout

implementation 'q.rorbin:VerticalTabLayout:1.2.5'

ButterKnife

implementation 'com.jakewharton:butterknife:8.8.1'  //butterknife控件导入框架
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
defaultConfig {
        //ButterKnife框架报错解决
        javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true } }

    }

EventBus

implementation 'org.greenrobot:eventbus:3.1.1' 

搜索框

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

日历

//日历
implementation 'com.prolificinteractive:material-calendarview:1.4.3'

粘性头布局

//粘性头布局
implementation 'com.github.qdxxxx:StickyHeaderDecoration:1.0.1'
//在bulid.gradle(project)
allprojects {
    repositories {
        google()
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

饺子播放器

implementation 'cn.jzvd:jiaozivideoplayer:6.0.0'//饺子播放器

统一当前Module的所有support包版本

// 统一当前Module的所有support包版本
    configurations.all {
        resolutionStrategy.eachDependency { DependencyResolveDetails details ->
            def requested = details.requested
            if (requested.group == 'com.android.support') {
                if (!requested.name.startsWith("multidex")) {
                    details.useVersion '28.0.0'
                }
            }
        }
    }

使导入的依赖能通过编译

//加在 compileSdkVersion 28下面
compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 一.榜单介绍 排行榜包括四大类: 单一框架:仅提供路由、网络层、UI层、通信层或其他单一功能的框架 混合开发框架:...
    不务正业的程序猿阅读 1,257评论 0 6
  • Fresco(依赖) Fresco是FaceBook推出的一个Android开源图片管理框架,它提供了图片下载、渐...
    陌诺阅读 1,853评论 0 2
  • 请允许我借鉴前辈们的东西~~~~ 感激不尽~~~~~ 以下为Android 框架排行榜 么么哒~ Android...
    嗯_新阅读 2,614评论 3 32
  • 该文章根据分类整理了较完善的github上开源库,以供平时开发根据自己需要直接找到使用,并且在平时开发和翻阅资料时...
    dabao123zbp阅读 1,596评论 1 54
  • 你真的担心他吗? 还是,你的手无所事事 还是,你要在诗的字里行间里 咬出血的痕迹? 你真的关心他吗? 还是,你像他...
    隔着玻璃亲嘴阅读 286评论 0 3

友情链接更多精彩内容