Why does Android Lint warn about String.format using default locale when explicitly using Locale.US?

Solution 1:

Cleaning and rebuilding the project should work.

BTW, you may want to use Locale.getDefault() to "take care" of texts not written in english.

Solution 2:

when I mentioned the locale with the format, the lint warning just vanished.

String.format(Locale.US,"%02d", selectedInt);