当前位置: 首页>后端>正文

Android依赖库

在dependencies{? }里面添加

1.Fragment的切换:?implementation"androidx.fragment:fragment-ktx:1.6.0"

2.Gson的导入:??implementation'com.google.code.gson:gson:2.10.1'

3.viewModel的使用:

implementation"androidx.fragment:fragment-ktx:1.6.0"

implementation'androidx.activity:activity-ktx:1.7.2'

4.navigation导航

// Kotlin

implementation("androidx.navigation:navigation-fragment-ktx:$nav_version")

implementation("androidx.navigation:navigation-ui-ktx:$nav_version")

// Java

implementation("androidx.navigation:navigation-fragment:$nav_version")

implementation("androidx.navigation:navigation-ui:$nav_version")

// Jetpack Compose Integration

implementation("androidx.navigation:navigation-compose:$nav_version")

5.替换classPath的插件

a.build.gradle (Project)

id 'androidx.navigation.safeargs' version'2.6.0' apply? false

b.build.gradle(Modle)的plugin

id 'androidx.navigation.safeargs'

6.loggit添加动画

implementation 'com.airbnb.android:lottie:6.1.0'

7。切换线程

implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9")

implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1")

implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1")

8. EventBus

implementation("org.greenrobot:eventbus:3.3.1")


https://www.xamrdz.com/backend/3g41938929.html

相关文章: