Android Studio删除棉绒错误 [英] Android Studio Remove lint error

查看:162
本文介绍了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).

这篇关于Android Studio删除棉绒错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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