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

前端 未结 12 2456
没有蜡笔的小新
没有蜡笔的小新 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:32

    You need String formatter. Please change below code from

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

    to

    String temp =  String.format(getResources().getString(R.string.create_group_select_people), countMax);
    

    For more detail information refer

提交回复
热议问题