android - 如何在 Android Studio 中添加编译器警告?

标签 android warnings android-studio compiler-warnings

在 Visual Studio 的 C# 中,我可以用

#warning The following method needs refactoring for clarity

什么是 Android Studio 的等价物?

最佳答案

尝试这样的事情:@SuppressWarnings("your message") 例如

@SuppressWarnings("your message") 
myMethod(){
body;
}

另外,看看这个问题:

How to intentionally cause a custom java compiler warning message?

关于android - 如何在 Android Studio 中添加编译器警告?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20972190/

相关文章:

android - 如何使用minifyEnable编译生产apk和使用minifyEnable false测试apk?

JAVA - 保存Excel(Office 2010)而没有格式警告

java - 有没有办法在一个媒体播放器对象中播放 mp3 文件?

android - 我可以将我的 Android 模拟器 (AVD) 连接到真实的接入点吗?

android - 从启动 Activity 返回时如何保留 AutoCompleteTextView DropDown 状态

android - 为什么 android 中的 xliff 在 Edittext 提示中显示格式说明符?

java - Runnable 不再在 Service 中运行以定期从 URL 检索

c++ - 虚假的 "<function> is expected to return a value"警告?

c - 在 C 中实现反向功能时出现段错误

Android:在 Android Studio 布局编辑器中隐藏 DrawerLayout 菜单面板