常用 Android 库
常用添加 Android 库
1.圆角图片显示
添加依赖
dependencies 中添加
implementation 'com.makeramen:roundedimageview:2.3.0'
repositories 中添加mavenCentral()
github地址
2.okhttp
添加依赖
implementation("com.squareup.okhttp3:okhttp:4.9.0")
okhttp官方地址
3.Glide 开源图片管理器
添加依赖
implementation 'com.github.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
Glide官方地址
4.CarView 卡片式布局
添加依赖
implementation("androidx.cardview:cardview:1.0.0")
CarView官方地址
5.Room 数据库管理
添加依赖
def room_version = "2.3.0"
/*
好像添加下面两条也能够运行?
*/
implementation("androidx.room:room-runtime:$room_version")
annotationProcessor "androidx.room:room-compiler:$room_version"
// To use Kotlin annotation processing tool (kapt)
kapt("androidx.room:room-compiler:$room_version")
// To use Kotlin Symbolic Processing (KSP)
ksp("androidx.room:room-compiler:$room_version")
// optional - Kotlin Extensions and Coroutines support for Room
implementation("androidx.room:room-ktx:$room_version")
// optional - RxJava2 support for Room
implementation "androidx.room:room-rxjava2:$room_version"
// optional - RxJava3 support for Room
implementation "androidx.room:room-rxjava3:$room_version"
// optional - Guava support for Room, including Optional and ListenableFuture
implementation "androidx.room:room-guava:$room_version"
// optional - Test helpers
testImplementation("androidx.room:room-testing:$room_version")
这是小睿的博客,如果需要转载,请标注出处啦~ヾ(≧▽≦*)o谢谢。