简体   繁体   English

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

[英]The prefix “android” for attribute “android:id” associated with an element type “ListView” is not bound

I keep getting this error 我不断收到这个错误

The prefix "android" for attribute "android:id" associated with an element type "ListView" is not bound. 与元素类型“ ListView”相关联的属性“ android:id”的前缀“ android”未绑定。

bit of code where the error is 错误所在的代码位

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

It works when this code isnt in the first veiw state when in flex as If i create another component the code works But I need it in the homeview to display the list of items the id is refering to but keeps saying undefined state 当此代码不在flex时处于第一个状态时,它可以工作,如如果我创建另一个组件,则代码可以工作,但是我需要在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>

` `

I think you should change the @android:id/list to @+id/list 我认为您应该将@android:id / list更改为@ + id / list

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

This should work! 这应该工作!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 与元素类型“beans”相关联的属性“xsi:schemaLocation”的前缀“xsi”未绑定 - The prefix “xsi” for attribute “xsi:schemaLocation” associated with an element type “beans” is not bound Spring 3.0:“与元素类型”Z“相关联的属性”Y“的前缀”X“未绑定” - Spring 3.0: “The prefix” X “for attribute” Y “associated with an element type” Z “is not bound” 与元素类型“ web-app”相关联的属性“ xsi:schemaLocation”的前缀“ xsi”未绑定 - The prefix “xsi” for attribute “xsi:schemaLocation” associated with an element type “web-app” is not bound 说明资源路径位置类型与元素类型“ beans:bean”相关联的属性“ p:sessionFactory-ref”的前缀“ p”未绑定 - Description Resource Path Location Type The prefix “p” for attribute “p:sessionFactory-ref” associated with an element type “beans:bean” is not bound 属性在listview上缺少Android名称空间前缀 - Attribute is missing Android namespace prefix on listview org.xml.sax.SAXParseException:与元素类型“ Employee”相关联的属性“ id”的值不得包含“ &lt;”字符。 在 - org.xml.sax.SAXParseException: The value of attribute “id” associated with an element type “Employee” must not contain the '<' character. at Android:内容必须有一个 id 属性为 &#39;android.R.id.list 的 ListView - Android: Content must have a ListView whose id attribute is 'android.R.id.list 属性缺少应用清单中的Android名称空间前缀 - Attribute is missing the Android namespace prefix in app manifest Xpath解析:元素的前缀未绑定 - Xpath parsing : The prefix for element is not bound Logcat错误内容必须具有ID属性为&#39;android.R.id.list&#39;的ListView - Logcat error-Content must have a ListView whose id attribute is 'android.R.id.list'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM