Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to identify where code is incorrect, if I get warning Converting to string: TypedValue?

Here is the extract from LogCat:

04-04 19:51:51.270: INFO/ActivityManager(57): Starting activity: Intent { cmp=com.example.app/.Preferences }
04-04 19:51:51.710: WARN/Resources(1081): Converting to string: TypedValue{t=0x10/d=0x0 a=-1}
04-04 19:51:51.740: WARN/Resources(1081): Converting to string: TypedValue{t=0x10/d=0x0 a=-1}
04-04 19:51:51.761: WARN/Resources(1081): Converting to string: TypedValue{t=0x10/d=0x79e a=-1}
04-04 19:51:51.800: WARN/Resources(1081): Converting to string: TypedValue{t=0x10/d=0x5a0 a=-1}
04-04 19:51:51.810: WARN/Resources(1081): Converting to string: TypedValue{t=0x10/d=0x5 a=-1}
04-04 19:51:51.830: WARN/Resources(1081): Converting to string: TypedValue{t=0x10/d=0xa a=-1}
04-04 19:51:51.840: WARN/Resources(1081): Converting to string: TypedValue{t=0x10/d=0xa a=-1}
04-04 19:51:51.860: WARN/Resources(1081): Converting to string: TypedValue{t=0x10/d=0x1e a=-1}
04-04 19:51:51.870: WARN/Resources(1081): Converting to string: TypedValue{t=0x10/d=0x1e a=-1}
04-04 19:51:53.450: INFO/ActivityManager(57): Displayed activity com.example.app/.Preferences: 2061 ms (total 2061 ms)
like image 737
LA_ Avatar asked Apr 05 '11 16:04

LA_


1 Answers

The TypedValue you get from logcat can be interpreted this way:

  • t ==> type (0x10 = TYPE_INT_DEC)
  • d ==> the actual data (to be intepreted as specified by t)
  • a ==> Additional information about where the value came from; only set for strings.
  • r ==> eventual resource id (not set if you passed a literal value)

So I guess you have to look for integers that you put where it expected strings.

like image 162
bigstones Avatar answered Sep 19 '22 23:09

bigstones