I get this warning when I try to list data. Does anyone know why?
You're referring to the Android platform's internal annotations, which aren't the ones you want to use for your own code. For your code, you should import the AndroidX versions of those annotations:
androidx.annotation.NonNull
androidx.annotation.Nullable
etc. (note the extra x
in androidx
vs android
)
You'll also want to make sure you have declared a dependency on androidx.annotation:annotation
in your build.gradle
(see here for the latest version information)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With