gpt4 book ai didi

android - LifecycleService 是否与生命周期扩展 Artifact 一起被弃用?

转载 作者:行者123 更新时间:2023-12-04 23:54:22 37 4
gpt4 key购买 nike

似乎曾经存在于 lifecycle-extensions Artifact 中的 LifecycleService 类在当前推荐的任何 Artifact 中都不可用。我希望它在 lifecycle-runtime 中,这是没有 ViewModel 和 LiveData 的那个,但是 LifecycleService 不在 lifecycle-viewmodel 中或者lifecycle-livedata.

LifecycleService 是否已弃用?

Source on current Lifecycle artifacts

最佳答案

不,LifecycleService 根据 Lifecycle 2.2.0 release noteslifecycle-service 依赖项中:

lifecycle-extensions Artifact Deprecation: With the above deprecation of ViewModelProviders.of(), this release marks the deprecation of the last API in lifecycle-extensions and this artifact should now be considered deprecated in its entirety. We strongly recommend depending on the specific Lifecycle artifacts you need (such as lifecycle-service if you’re using LifecycleService and lifecycle-process if you’re using ProcessLifecycleOwner) rather than lifecycle-extensions as there will not be a future 2.3.0 release of lifecycle-extensions.

关于android - LifecycleService 是否与生命周期扩展 Artifact 一起被弃用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60157498/

37 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com