내 Android 프로젝트가 올바르게 컴파일되고 휴대 전화와 에뮬레이터 모두에서 정상적으로 실행되며 LinearLayouts, TextViews, Buttons, Images 및 사용자 정의보기 구성 요소가 포함 된 여러 XML 레이아웃 파일도 포함됩니다 , 그러나 모양에 올 때 단순히 그것을 찾아 낼 수 없다.AndroidManifest : 알 수없는 'shape'XML 요소를 무시합니다
Heres는 내 코드 :
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<solid android:color="#ffffff"/>
<stroke android:width="3dp"
android:color="#ff000000"/>
<padding android:left="1dp"
android:top="1dp"
android:right="1dp"
android:bottom="1dp"/>
<corners android:radius="30dp"/>
</shape>
내가 이클립스 그래픽 레이아웃에서 얻을 오류 :
com.android.layoutlib.bridge.MockView cannot be cast to android.view.ViewGroup
Exception details are logged in Window > Show View > Error Log
The following classes could not be found:
- shape (Fix Build Path, Edit XML)
- solid (Fix Build Path, Edit XML)
내가 안드로이드 2.2 프로 요 구글 API를 목표로하고있다.
제안 사항?
내 머리 꼭대기에서이 XML 파일을 res/drawable 디렉토리에 저장 했습니까? – dbryson
아니요, res/layout. res/drawable이 이미지 용이라고 생각 했나요? xml 레이아웃에서 사각형을 그리려면 어떻게해야합니까? – Ring