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

后端 未结 4 1198
感动是毒
感动是毒 2021-02-03 16:54

I originally called String.format this way:

return String.format(\"%s %f %f\", anotherString, doubleA, doubleB);

Which made Androi

4条回答
  •  日久生厌
    2021-02-03 17:33

    Simply add Your Locale; for English Locale,

    return String.format(Locale.ENGLISH,"%s %f %f", anotherString, doubleA, doubleB);

提交回复
热议问题