Android Studio Remove lint error

妖精的绣舞 提交于 2020-01-24 14:26:25

问题


I need to remove a lint error and I don't know how to do that. The problem is that lint is interpreting wrong a regex expression. As the expression is in UTF-16, the range is right, but it interprets it as UTF-8 then it detects an Illegal character range (from < to) exception on my EMOJI_REGEX . Although the lint error, the code is working fine, so I need to remove that lint error. How could I do that?

private final static String EMOJI_REGEX = "([\\u20a0-\\u32ff\\ud83c\\udc00-\\ud83d\\udeff\\udbb9\\udce5-\\udbb9\\udcee])";

I have tried:

@SuppressLint("all") 

but nothing changed.

Thanks in advance!


回答1:


Try this:right click in file,Analyse->InspectCode. Select Current File -> Ok. Now you will see Lint issues. Select yours and see what suggestions you have (like supress or remove (on right click on the issue).



来源:https://stackoverflow.com/questions/37455291/android-studio-remove-lint-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!