【问题标题】:The prefix "android" for attribute "android:id" associated with an element type "ListView" is not bound与元素类型“ListView”关联的属性“android:id”的前缀“android”未绑定
【发布时间】:2013-03-16 04:05:05
【问题描述】:

我不断收到此错误

与元素类型“ListView”关联的属性“android:id”的前缀“android”未绑定。

错误所在的代码

<ListView
    android:id="@android:id/list"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:choiceMode="singleChoice">
</ListView>

当此代码在 flex 中不处于第一个 veiw 状态时,它可以工作,因为如果我创建另一个组件,代码可以工作但我需要在 homeview 中显示 id 所指的项目列表,但一直说未定义状态

`

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">
    <s:List
        android:id="@+id/Games"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
    </s:List>
    </LinearLayout>

`

【问题讨论】:

    标签: java apache-flex flex4.5


    【解决方案1】:

    我认为您应该将@android:id/list 更改为@+id/list

    <ListView
        android:id="@+id/list"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:choiceMode="singleChoice">
    </ListView>
    

    这应该可行!

    【讨论】:

    • 仍然收到错误,但在我的其他评论中添加了更多细节
    猜你喜欢
    • 2020-04-05
    • 2016-10-12
    • 1970-01-01
    • 2015-03-05
    • 2018-09-12
    • 1970-01-01
    • 1970-01-01
    • 2011-05-15
    • 2018-04-09
    相关资源
    最近更新 更多