나는 자바/이클립스에서 꽤 경험이있다. 그러나 나는 안드로이드 개발에 완전히 익숙하지 않다. 그리고 그것은 지금까지 아주 이상한 짐승으로 입증되었다. 현재 두 개의 이미지 버튼으로 애플리케이션을 만들려고합니다.안드로이드 - 이클립스가 ImageButton 클래스를 찾을 수 없다
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="24dp"
android:text="@string/now_playing" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageButton
android:id="@+id/StartButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/start_button"
android:contentDescription="@string/start_button" />
<ImageButton
android:id="@+id/StopButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@drawable/stop_button"
android:contentDescription="@string/stop_button" />
</LinearLayout>
</LinearLayout>
이 올바른 것으로 나타나지만 ImageButtons는 그래픽 레이아웃 탭에서 제대로 렌더링하지 않고, "다음 클래스를 찾을 수 없습니다라는 메시지가 : 다음과 같이 내 XML은 가 - ImageButton (android.widget.ImageButton으로 변경, 빌드 경로 수정, XML 편집) ".
온라인을 조금 둘러 본 후에이 질문이 StackOverflow에서 몇 번 나타 났지만 만족스러운 답변을 찾을 수 없었습니다. 가장 일반적인 대답은 프로젝트를 청소하는 것이었지만 이것은 나에게 아무런 성과가 없었습니다. 어떤 제안?
에 한번 청소에 의해
교체 : 아 내가보고하지 않았다. 때때로 eclipse에서 xml을 크게 변경하면 이상한 문제가 발생합니다. –