Android Story

[ Android ] Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute? 에러

WhiteDuck 2016. 6. 13. 09:10
<string name="app_setting_info_description_app_version"> Version Name : %s\nVersionCode : %d</string>


다중 String format 사용시 에러


해결 방법 : 

<string name="app_setting_info_description_app_version"> Version Name : %1$s\nVersionCode : %2$d</string>

 [ 순서 붙이기 ]

<string name="app_setting_info_description_app_version" format="false"> Version Name : %s\nVersionCode : %d</string>

[ format 제거하기 ]

반응형