什么是@燮pressWarnings("德precation")和("不用")在Android中? [英] What is @SuppressWarnings("deprecation") and ("unused") in Android?

查看:206
本文介绍了什么是@燮pressWarnings("德precation")和("不用")在Android中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有时候,我在我的项目的一些警告:

Sometimes I've some warnings in my project:

@SuppressWarnings("deprecation")
@SuppressWarnings("unused")

这是什么意思?

What does this mean?

推荐答案

@燮pressWarnings 标注禁用某些编译器警告。在这种情况下,约德$ P $警告pcated code(德precation)和未使用的局部变量或者未使用的私有方法(未使用)。 本文介绍了可能的值。

The @SuppressWarnings annotation disables certain compiler warnings. In this case, the warning about deprecated code ("deprecation") and unused local variables or unused private methods ("unused"). This article explains the possible values.

这篇关于什么是@燮pressWarnings("德precation")和("不用")在Android中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆