Format string XXX is not a valid format string so it should not be passed to String.format

前端 未结 12 2157
没有蜡笔的小新
没有蜡笔的小新 2021-02-06 23:06

I have android app and this string in resources:

Select up to %1$d people!

Thi

12条回答
  •  南方客
    南方客 (楼主)
    2021-02-06 23:40

    This error will be shown if you have the same string in multiple string files (translations), but one of them doesn't have proper format like missing "%s" or "%1$s", which will be used to place paramters passed (ex: "countMax") in below line.

    getResources().getString(R.string.create_group_select_people, countMax)

    So, please check that before you are going to try any other answers mentioned above.

提交回复
热议问题