我在尝试列出数据时收到此警告.有谁知道为什么?
I get this warning when I try to list data. Does anyone know why?
您指的是 Android 平台的内部注解,这些注解并不是您想要用于您自己的代码的注解.对于您的代码,您应该导入这些注释的 AndroidX 版本:
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
等等.(注意 androidx vs android 中额外的 x)
etc. (note the extra x in androidx vs android)
您还需要确保在 build.gradle 中声明了对 androidx.annotation:annotation 的依赖项(请参阅 这里获取最新版本信息)
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)
这篇关于'android.annotation.NonNull' 在 'android.annotation' 中不公开.无法从外部包访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
如何检测 32 位 int 上的整数溢出?How can I detect integer overflow on 32 bits int?(如何检测 32 位 int 上的整数溢出?)
return 语句之前的局部变量,这有关系吗?Local variables before return statements, does it matter?(return 语句之前的局部变量,这有关系吗?)
如何将整数转换为整数?How to convert Integer to int?(如何将整数转换为整数?)
如何在给定范围内创建一个随机打乱数字的 intHow do I create an int array with randomly shuffled numbers in a given range(如何在给定范围内创建一个随机打乱数字的 int 数组)
java的行为不一致==Inconsistent behavior on java#39;s ==(java的行为不一致==)
为什么 Java 能够将 0xff000000 存储为 int?Why is Java able to store 0xff000000 as an int?(为什么 Java 能够将 0xff000000 存储为 int?)