2

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!

FVod
  • 2,245
  • 5
  • 25
  • 52

1 Answers1

2

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

Rucsi
  • 284
  • 1
  • 10
  • Thank you for your answer. I've tried that and @SuppressWarnings("MalformedRegex") is added, but the error label is still there :( – FVod May 26 '16 at 08:37
  • 1
    On Android Studio 2.1.1 I have no error on that line of code, so I can't help more, sorry. Anyway, sometimes, cleaning and rebuilding the project can suppress fake error labels. – Rucsi May 26 '16 at 08:43
  • Updating Android Studio to 2.2 solved the problem. Thanks a lot! – FVod May 26 '16 at 09:50