可能的重复:
Android CalendarView 类找不到
我尝试在布局中放置一个日期选择器,但它只显示:DatePicker
和这个错误:The following classes could not be found:
- DatePicker (Change to android.widget.DatePicker, Fix Build Path, Edit XML)
我不知道这是什么,因为我的应用程序中已经有一个 DatePicker 并且它工作正常,只是不知道为什么这个现在不起作用。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:ignore="HardcodedText" >
<TextView
android:id="@+id/tvNomeR"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="" />
<TextView
android:id="@+id/tvDataR"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="" />
<TextView
android:id="@+id/tvMensagemR"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="" />
<DatePicker
android:id="@+id/datePicker1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<Button
android:id="@+id/bAdiarR"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Adiar" />
<Button
android:id="@+id/bResponderR"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Responder" />
</LinearLayout >
</LinearLayout>
我明白你在图形布局中所说的内容,但这不会影响你的应用程序。此错误仅意味着 Eclipse 无法为您的布局构建 DatePicker 的预览。我敢打赌,如果你运行你的应用程序,它会显示得很好。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)