Supported @SuppressWarnings Values in Android Stud

2019-02-03 22:06发布

What are all of the supported values for @SuppressWarnings in Android Studio?

I couldn't find any documentation on it, and I know it isn't the same as Eclipse because "null" doesn't work. You can catch null warnings with "all", but as you can imagine I'd rather not.

3条回答
Root(大扎)
2楼-- · 2019-02-03 22:22

Look at this page for list of @SuppressWwarnings :

https://gist.github.com/elevenetc/bf795f94aaf3e92169ef

查看更多
成全新的幸福
3楼-- · 2019-02-03 22:27

This is very simple, just click on the deprecated word and press ALT + ENTER on your keyboard, click on --> Inspection 'Deprecated API usage' options. In the drop-down menu, u can select the option that matches your choice, e.g Suppress for class, Suppress for method, Suppress for statement.. Hope it helps.

查看更多
小情绪 Triste *
4楼-- · 2019-02-03 22:31

These are not intended to be entered by hand, use Alt+Enter, Suppress... menu item (from the right arrow sub-menu) on the code that is highlighted with the inspection.

查看更多
登录 后发表回答