Possible Duplicate:
Android CalendarView class cannot be foundDatePicker không hoạt động khi cố gắng sử dụng nó
Tôi đã thử đặt một ngày Picker trong cách bố trí của tôi, nhưng thay vì DatePicker nó chỉ cho thấy: DatePicker
và lỗi này: The following classes could not be found: - DatePicker (Change to android.widget.DatePicker, Fix Build Path, Edit XML)
tôi không biết điều này là bởi vì tôi đã có một DatePicker trong ứng dụng của tôi và nó hoạt động tốt chỉ không biết tại sao điều này bây giờ không hoạt động.
<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>
Nếu không hiển thị cho chúng tôi mã có liên quan, hầu như không thể biết bạn đang làm gì sai. – Sam
có thể bạn đang thiếu câu lệnh 'import' –
Câu hỏi vấn đề không rõ ràng. Vui lòng đặt một số mã. Chính xác bạn đang gặp lỗi này ở đâu? –