Android

안드로이드 Format string XXX is not a valid format string so it should not be passed to String.format 오류 처리 방법

Caused by java.util.UnknownFormatConversionException
Conversion:
java.util.Formatter$FormatSpecifierParser.unknownFormatConversionException (Formatter.java:2306)
java.util.Formatter$FormatSpecifierParser.advance (Formatter.java:2300)
java.util.Formatter$FormatSpecifierParser.parseConversionType (Formatter.java:2379)
java.util.Formatter$FormatSpecifierParser.parseArgumentIndexAndFlags (Formatter.java:2350)
java.util.Formatter$FormatSpecifierParser.parseFormatToken (Formatter.java:2283)
java.util.Formatter.doFormat (Formatter.java:1071)
java.util.Formatter.format (Formatter.java:1042)
java.util.Formatter.format (Formatter.java:1011)
java.lang.String.format (String.java:1999)
java.lang.String.format (String.java:1973)
ddolcatmaster.mypowermanagement.TTSActivity$2.onProgressChanged (Unknown Source)
android.widget.SeekBar.onProgressRefresh (SeekBar.java:91)
android.widget.ProgressBar.doRefreshProgress (ProgressBar.java:660)
android.widget.ProgressBar.refreshProgress (ProgressBar.java:672)
android.widget.ProgressBar.setProgress (ProgressBar.java:719)
android.widget.ProgressBar.setProgress (ProgressBar.java:700)
ddolcatmaster.mypowermanagement.TTSActivity.saveSharedPref (Unknown Source)
ddolcatmaster.mypowermanagement.TTSActivity.onCreate (Unknown Source)
android.app.Activity.performCreate (Activity.java:5312)
android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1111)
android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2395)
android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2495)
android.app.ActivityThread.access$800 (ActivityThread.java:153)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1349)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:157)
android.app.ActivityThread.main (ActivityThread.java:5633)
java.lang.reflect.Method.invokeNative (Method.java)
java.lang.reflect.Method.invoke (Method.java:515)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:896)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:712)
dalvik.system.NativeStart.main (NativeStart.java)

if a string contains a ‘%’ character, then the string may be a formatting string which will be passed to string.format from java code to replace each ‘%’ occurrence with specitic values

국가별 언어 string.xml 파일 중 3개에 잘못된 동적 바인딩이 있다는 뜻이다. 특정 언어의 경우 뒤에서부터 앞으로 쓰여지는 언어들이 있다. 만약 %s 나 %d를 사용하였다면 찾아서 s% 나 d%로 변경해야한다.

    <string name="cont_35">د %s پاتې بټری</string>

한 참을 찾았다. 기록만이 살길이다. 시간이 지나면 또 기억나지 않기때문에!!! 사람은 망각의 동물이다.

Leave a Reply

error: Content is protected !!