Issue
Here are my dependencies:
//Room and Lifecycle Libraries
kapt "androidx.room:room-compiler:2.2.0-alpha02"
kapt 'androidx.room:room-compiler:2.2.0-alpha02'
kapt "androidx.lifecycle:lifecycle-compiler:2.2.0-alpha03"
implementation "androidx.room:room-runtime:2.2.0-alpha02"
implementation 'androidx.room:room-runtime:2.2.0-alpha02'
implementation "androidx.lifecycle:lifecycle-viewmodel:2.2.0-alpha03"
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0-alpha03"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0-alpha03"
implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:1.0.0-alpha03"
implementation 'com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2'
As you can see, I implemented the final versions and yet I do not have access to the liveData builder. How can I fix this?
Solution
From the documentation:
For
liveData
, useandroidx.lifecycle:lifecycle-livedata-ktx:2.2.0-alpha01
or higher.
So you're just missing the dependency:
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.2.0-alpha03"
Answered By - jsamol
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.