How to get lifecycle.coroutineScope with new androidx.lifecycle:*:2.2.0-alpha01

前端 未结 2 683
你的背包
你的背包 2021-02-18 15:09

On 7th May, 2019 androidx.lifecycle:*:2.2.0-alpha01 was released announcing:

This release adds new features that adds support for Kotlin coro

2条回答
  •  遇见更好的自我
    2021-02-18 15:37

    I actually spent a couple hours trying to figure this out myself and it turns out it is in a new package that only exists as of the alpha. Add this and you should be good to go.

    implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_ver"
    

提交回复
热议问题