Android Resources converting to string TypedValue warning

后端 未结 6 998
旧巷少年郎
旧巷少年郎 2020-12-13 23:12

Ok I\'m looking right past something here..

Every time I\'m in my app and I change activities, logcat reports series of warnings:

02-04 14:42:36.524:         


        
6条回答
  •  时光取名叫无心
    2020-12-14 00:07

    In my case the problem was in ListPreference default value. Even if you type it as String (for example "10") it will be interpreted as int and then converted to String and thus complaining.

    For example, this will give a warning:

    
    

    but this will not:

    
    

    and define @string/ten in strings.xml as:

    10
    

    Dumb, but it gets rid of the warning.

提交回复
热议问题