Search code examples
androidandroid-studioandroid-studio-2.0android-lint

Android Studio Remove lint error


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!


Solution

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