为什么我会出现错误,将SeekBar放在小部件布局上?

时间:2010-02-25 12:25:50

标签: xml android

<RelativeLayout 
    xmlns:android           = "http://schemas.android.com/apk/res/android"
    android:id          = "@+id/widget"
    android:layout_width        = "fill_parent"
    android:layout_height       = "fill_parent" 
    android:background      = "@drawable/widget_background" 
    android:layout_gravity      = "left"
    >

        <SeekBar
            android:layout_width        = "fill_parent"
            android:layout_height       = "wrap_content"
        />

</RelativeLayout>

我收到“问题加载小部件” 为什么这种布局不起作用?

02-25 15:16:20.904:WARN / ResourceType(57):资源不包含资源编号为0x7f060000的包

02-25 15:16:21.003:WARN / ResourceType(57):资源不包含资源编号为0x7f060001的包

02-25 15:16:21.664:WARN / ResourceType(57):资源不包含资源编号为0x7f060000的包

02-25 15:16:21.673:WARN / ResourceType(57):资源不包含资源编号为0x7f060001的包

02-25 15:16:21.753:WARN / ResourceType(57):资源不包含资源编号为0x7f030000的包

02-25 15:16:32.083:WARN / AppWidgetHostView(102):错误导致AppWidget AppWidgetProviderInfo(provider = ComponentInfo {myPackage.myApp / myPackage.myApp.MyClass}):android.view.InflateException:二进制XML文件行#15:使类android.widget.SeekBar

出错

1 个答案:

答案 0 :(得分:0)

看一下这篇文章

Android: Resources don't contain package for resource number 0x

您是尝试从java代码引用这些资源,还是只从setContentView加载它们?