Java 前缀为;安卓;对于属性“;安卓:id“;与元素类型“关联”;“列表视图”;不受约束
我一直在犯这个错误 与元素类型“ListView”关联的属性“android:id”的前缀“android”未绑定 错误所在的代码位Java 前缀为;安卓;对于属性“;安卓:id“;与元素类型“关联”;“列表视图”;不受约束,java,apache-flex,flex4.5,Java,Apache Flex,Flex4.5,我一直在犯这个错误 与元素类型“ListView”关联的属性“android:id”的前缀“android”未绑定 错误所在的代码位 <ListView android:id="@android:id/list" android:layout_width="fill_parent" android:layout_height="wrap_content" android:choiceMode="singleChoice"> </ListView&
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:choiceMode="singleChoice">
</ListView>
在flex中,当此代码不处于第一个veiw状态时,它可以工作,就像我创建了另一个组件一样。代码可以工作,但我需要它在homeview中显示id所引用的项目列表,但一直显示未定义状态
`
`我认为您应该将@android:id/list更改为@id+list
<ListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:choiceMode="singleChoice">
</ListView>
这应该管用 仍然得到错误,但在我的其他评论中添加了更多细节
<ListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:choiceMode="singleChoice">
</ListView>