为什么logcat显示WARN / Resources(1865):转换为字符串:TypedValue {t = 0x12 / d = 0x0?

时间:2011-06-22 12:52:55

标签: android android-logcat

我在对话框中有微调器,当我从微调器中选择值时,log cat显示以下信息..

06-22 12:42:48.941: WARN/Resources(1865): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f090290}

06-22 12:42:48.991: WARN/Resources(1865): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f090290}

06-22 12:42:50.471: WARN/Resources(1865): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f090290}

06-22 12:42:50.520: WARN/Resources(1865): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f090290}

06-22 12:42:50.540: WARN/Resources(1865): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f090290}

06-22 12:42:50.550: WARN/Resources(1865): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f090290}

06-22 12:42:50.561: WARN/Resources(1865): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f090290}

06-22 12:42:50.571: WARN/Resources(1865): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f090290}

06-22 12:42:50.580: WARN/Resources(1865): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f090290}

06-22 12:42:50.590: WARN/Resources(1865): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f090290}

06-22 12:42:52.221: WARN/Resources(1865): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f090290}

06-22 12:42:52.301: WARN/InputManagerService(59): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@44ed5cc0

这条消息显示的是什么?

4 个答案:

答案 0 :(得分:2)

WARN消息显示r = 0x7f090290,因此在生成的R.java中, 你应该找到0x7f090290,问题应该与变量有关 在数字附近。我想你需要改变字符串< - >资源xml中的整数。

答案 1 :(得分:1)

转到开发者选项 - > " 启用视图属性检查"取消选中此选项可解决问题。

答案 2 :(得分:0)

通常你会搜索你的R.java文件,找到导致问题的项目(在你的情况下为0x7f090290)......并找到匹配的变量名称。但是没有快速的方法可以使用Eclipse来查找该项目的使用位置。它可能在无处不在的文件中。并且(在我的情况下)它根本不存在。

答案 3 :(得分:0)

问题是android:text="@+id/fooText

尝试更改 XML ,如下所示:

 <TextView 
android:id="@+id/foo" 
android:text="@+id/fooText"/>

对此:

    <TextView 
android:id="@+id/foo" 
android:text=""/>