弃用的库 @Deprecated

Android Support Library

这是 Support 库 28.0.0 的稳定版(2018 年 9 月 21 日),适合在生产环境中使用。这将是 android.support 打包下的 最后一个功能版本,我们建议开发者迁移到 AndroidX

Butter Knife

This tool is now deprecated. Please switch to view binding. Existing versions will continue to work, obviously, but only critical bug fixes for integration with AGP will be considered. Feature development and general bug fixes have stopped.

JCenter

JFrog(这家公司维护着很多 Android 项目使用的 JCenter 工件库)已于 2021 年 3 月 31 日将 JCenter 设为 只读代码库。根据公告,JCenter 将无限期地提供现有工件供用户下载。
警告请勿添加 jcenter() 代码库,以免获取过时的依赖项

Kotlin

kotlin-android-extensions

Kotlin Android Extensions is deprecated, which means that using Kotlin synthetics for view binding is no longer supported. If your app uses Kotlin synthetics for view binding, use this guide to migrate to Jetpack view binding.

注意: 如果您的应用使用 Parcelable 功能,请改用 独立的 kotlin-parcelize Gradle 插件,详见 Parcelable 实现生成器

Lifecycle

lifecycle-extensions

The APIs in lifecycle-extensions have been deprecated. Instead, add dependencies for the specific Lifecycle artifacts you need.

    dependencies {
    
    
        def lifecycle_version = "2.8.4"
        def arch_version = "2.2.0"

        // ViewModel
        implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
        // ViewModel utilities for Compose
        implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycle_version"
        // LiveData
        implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
        // Lifecycles only (without ViewModel or LiveData)
        implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
        // Lifecycle utilities for Compose
        implementation "androidx.lifecycle:lifecycle-runtime-compose:$lifecycle_version"

        // Saved state module for ViewModel
        implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:$lifecycle_version"

        // Annotation processor
        kapt "androidx.lifecycle:lifecycle-compiler:$lifecycle_version"
        // alternately - if using Java8, use the following instead of lifecycle-compiler
        implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"

        // optional - helpers for implementing LifecycleOwner in a Service
        implementation "androidx.lifecycle:lifecycle-service:$lifecycle_version"

        // optional - ProcessLifecycleOwner provides a lifecycle for the whole application process
        implementation "androidx.lifecycle:lifecycle-process:$lifecycle_version"

        // optional - ReactiveStreams support for LiveData
        implementation "androidx.lifecycle:lifecycle-reactivestreams-ktx:$lifecycle_version"

        // optional - Test helpers for LiveData
        testImplementation "androidx.arch.core:core-testing:$arch_version"

        // optional - Test helpers for Lifecycle runtime
        testImplementation "androidx.lifecycle:lifecycle-runtime-testing:$lifecycle_version"
    }

Python

python2

We are volunteers who make and take care of the Python programming language. We have decided that January 1, 2020, was the day that we sunset Python 2. That means that we will not improve it anymore after that day, even if someone finds a security problem in it. You should upgrade to Python 3 as soon as you can.

猜你喜欢

转载自blog.csdn.net/qq_34801506/article/details/83692071