Android Studio删除棉绒错误

Android Studio删除棉绒错误

问题描述:

我需要删除一个皮棉错误,但我不知道该怎么做。
问题是,皮棉错误解释了正则表达式。由于表达式使用UTF-16,因此范围是正确的,但是它将其解释为UTF-8,然后在我的EMOJI_REGEX上检测到非法字符范围(从<到)。尽管出现了lint错误,但代码运行正常,因此我需要删除该lint错误。我该怎么办?

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])";

我尝试过:

@SuppressLint("all") 

但没有任何改变。

先谢谢了!

尝试一下:右键单击文件,分析-> InspectCode。选择当前文件->确定。现在您将看到Lint问题。选择您的建议,然后查看您有什么建议(例如抑制或删除(右键单击问题))。

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).