最佳答案
通常,您不应禁用方法的弃用标志。在大多数情况下,给定方法的 KDoc/Javadoc 解释了您应该使用什么来代替已弃用的方法。
弃用意味着什么? (官方Java文档)
A program element annotated @Deprecated is one that programmers are discouraged from using, typically because it is dangerous, or because a better alternative exists.
尽管您可以禁用弃用标志 在方法签名级别添加注释:
@Suppress("DEPRECATION")
fun methodName() {
...
deprecatedMethod()
...
}
关于android - 如何在Android studio中禁用折旧?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58983231/