LifecycleService 是否与生命周期扩展工件一起被弃用?
Is LifecycleService deprecated along with lifecycle-extensions artifact?
似乎曾经存在于 lifecycle-extensions
工件中的 LifecycleService class 在当前推荐的任何工件中都不可用。我希望它在 lifecycle-runtime
中,这是没有 ViewModel 和 LiveData 的那个,但是 LifecycleService
不在 lifecycle-viewmodel
或 lifecycle-livedata
.
中
LifecycleService 是否已弃用?
不,LifecycleService
根据 Lifecycle 2.2.0 release notes:
在 lifecycle-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
.
似乎曾经存在于 lifecycle-extensions
工件中的 LifecycleService class 在当前推荐的任何工件中都不可用。我希望它在 lifecycle-runtime
中,这是没有 ViewModel 和 LiveData 的那个,但是 LifecycleService
不在 lifecycle-viewmodel
或 lifecycle-livedata
.
LifecycleService 是否已弃用?
不,LifecycleService
根据 Lifecycle 2.2.0 release notes:
lifecycle-service
依赖项中
lifecycle-extensions
Artifact Deprecation: With the above deprecation ofViewModelProviders.of()
, this release marks the deprecation of the last API inlifecycle-extensions
and this artifact should now be considered deprecated in its entirety. We strongly recommend depending on the specific Lifecycle artifacts you need (such aslifecycle-service
if you’re usingLifecycleService
andlifecycle-process
if you’re usingProcessLifecycleOwner
) rather than lifecycle-extensions as there will not be a future2.3.0
release oflifecycle-extensions
.