any prevision for migration to androidx support library? following the docs https://docs.objectbox.io/livedata-arch.-comp. the observe method from LiveData is highlighted red by the ide (not found). opening the ObjectBoxLiveData class the LiveData class is missing _android.arch.lifecycle.LiveData_.
//observe not found
model.getNoteLiveData(notesBox).observe(this, new Observer<List<Note>>() {
@Override
public void onChanged(@Nullable List<Note>; notes) {
notesAdapter.setNotes(notes);
}
});
Do you have your project set up correctly for AndroidX? Check if your gradle.properties file contains:
android.useAndroidX=true
android.enableJetifier=true
Check the migration guide to continue using libraries that do not yet use the new imports.
Anyhow, leaving this open to track changing our dependencies/imports to AndroidX.
-ut
I also ran into this problem.
I solved it with
I'm not sure this is best, but worked for me. I hope this helps.
I also ran into this problem.
I solved it with
- Delete gradle cache ( https://www.airaghi.net/en/2016/09/21/how-to-delete-gradle-cache-files/ )
- Restart Android Studio with "File" -> "Invalidate Caches / Restart".
- Indexing seems stuck, "Invalidate Caches / Restart" again.
I'm not sure this is best, but worked for me. I hope this helps.
It's works!!! Thanks you friend
This is also part of the just released version '2.4.0-RC' - would be great if you could give it a try and report back. Thank you!
Most helpful comment
I also ran into this problem.
I solved it with
I'm not sure this is best, but worked for me. I hope this helps.