安卓開發中常用的依賴(常更新)

1.RecyclerView

implementation 'androidx.recyclerview:recyclerview:1.0.0'

2.CardView

 implementation 'androidx.cardview:cardview:1.0.0'

3.viewpager

implementation 'androidx.viewpager:viewpager:1.0.0'

 4.NavigationView 側滑

implementation 'com.google.android.material.navigation.NavigationView:1.0.0'

5.drawerlayout 抽屜佈局

implementation'androidx.drawerlayout:drawerlayout:1.0.0'

6.material design

implementation 'com.google.android.material:material:1.0.0-rc01'

7.Glide

implementation 'com.github.bumptech.glide:glide:4.4.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.4.0'

8.Okhttp

  implementation 'com.squareup.okhttp3:okhttp:3.14.1'
    implementation 'com.squareup.okio:okio:2.2.2'

如果遇到問題:Static interface methods are only supported starting with Android N (--min-api 24)錯誤怎麼修改

build.gradle(app)的android{}中加入

compileOptions {
 
    sourceCompatibility JavaVersion.VERSION_1_8
 
    targetCompatibility JavaVersion.VERSION_1_8
 
}

 

9.Retrofit

implementation 'com.squareup.retrofit2:retrofit:2.4.0'

10.TabLayout

 implementation 'com.google.android.material:material:1.0.0'

11. Snackbar

    implementation 'com.google.android.material:material:1.3.0-alpha01'

12.swipefreshrelayout

implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'

13.viewPager 2 這個是2與viewPager不同哦

implementation 'androidx.viewpager2:viewpager2:1.0.0'

 

 

 

 

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章