Android Studio不推荐使用 [英] Android Studio ignore deprecated
本文介绍了Android Studio不推荐使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将Eclispe项目移至Android Studio,但在构建时会输出很多不建议使用的错误.我尝试了一些方法,但是它们不起作用.
I moved my Eclispe project to Android Studio, but it outputs a lot of deprecated errors when built. I tried some methods, but they don't work.
推荐答案
尝试将其放在方法的顶部:
Try placing this at the top of the methods:
@SuppressWarnings("deprecation")
示例
@SuppressWarnings("deprecation")
public void testMethod(){
...
}
有关简要说明,请访问以下链接:
For a brief explaination go to this link:
https://stackoverflow.com/questions/7397996/什么-禁止警告弃用且未在Android中使用
更新:
似乎还有一些关于弃用的已知问题.您可能需要阅读以下内容以获得更多信息:
It seems that there is also some known issues with deprecations. You might want to read this for more info:
这篇关于Android Studio不推荐使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文