Androidx常用依賴,整理對(duì)照

implementation 'androidx.cardview:cardview:1.0.0'           //cardview卡片布局
implementation 'org.greenrobot:eventbus:3.1.1'                //eventbus
implementation 'fm.jiecao:jiecaovideoplayer:5.5'               //節(jié)操視頻
implementation 'androidx.recyclerview:recyclerview:1.0.0'    //recyclerview
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.42'     //萬(wàn)能適配器
implementation 'com.github.bumptech.glide:glide:4.9.0'      //glide
implementation 'com.blankj:utilcodex:1.28.3'   //AndroidUtils工具包
implementation 'androidx.appcompat:appcompat:1.0.0'         //原V7包
implementation 'com.google.android.material:material:1.0.0'      //原design包
implementation 'androidx.legacy:legacy-support-v4:1.0.0'         //原V4包      
implementation group: 'org.jsoup', name: 'jsoup', version: '1.13.1'    //jsoup爬蟲(chóng)
implementation 'com.google.code.gson:gson:2.8.4'     //Gson解析
implementation 'cn.jzvd:jiaozivideoplayer:6.2.12'   //餃子視頻
implementation 'com.shuyu:GSYVideoPlayer:7.1.4'    //GSYVideoPlayer 視頻播放器,完整版
implementation 'io.reactivex.rxjava2:rxjava:2.2.0'                      //Rxjava
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'                //Rxjava   線程調(diào)度器在此依賴

implementation 'com.jakewharton:butterknife:10.2.3'               //butterknife
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3'

implementation 'com.squareup.retrofit2:retrofit:2.5.0'    //retrofit
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'  //解析器
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.5.0' //retrofit使用的rxjava調(diào)度器
implementation 'com.squareup.okhttp3:okhttp:3.6.0'   //okhttp

//SmartRefreshLayout 刷新
implementation 'androidx.appcompat:appcompat:1.0.0'                 //必須 1.0.0 以上
implementation  'com.scwang.smart:refresh-layout-kernel:2.0.3'      //核心必須依賴
implementation  'com.scwang.smart:refresh-header-material:2.0.3'    //谷歌刷新頭
implementation  'com.scwang.smart:refresh-footer-classics:2.0.3'    //經(jīng)典加載

implementation 'com.contrarywind:Android-PickerView:4.1.9'  //時(shí)間選擇器

implementation 'com.github.LuckSiege.PictureSelector:picture_library:v2.6.0'  //圖片選擇器

implementation 'com.hjq:xxpermissions:10.6'  //權(quán)限請(qǐng)求庫(kù)

導(dǎo)入依賴失敗的話,是需要自己加倉(cāng)庫(kù)地址

allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }   //倉(cāng)庫(kù)地址
    }
}


butterknife另外需要加入以下代碼

android {
  ....
  //需要指定使用jdk1.8
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}



buildscript {
    ...
    dependencies {
        classpath 'com.jakewharton:butterknife-gradle-plugin:10.2.3'  //添加地址
    }
}

allprojects {
    repositories {
        ....
        maven { url 'https://jitpack.io' }   //倉(cāng)庫(kù)地址
    }
}


持續(xù)更新。。。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

友情鏈接更多精彩內(nèi)容