我正在尝试通过将其包含在以下内容中来绘制一个矩形/layout/myactivity.xml
:
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:radius="2dp"
android:topRightRadius="0dp"
android:bottomRightRadius="0dp"
android:bottomLeftRadius="0dp" />
<stroke
android:width="1dp"
android:color="@android:color/white" />
</shape>
当我尝试运行该项目时,我得到:
05-12 23:37:14.090: E/AndroidRuntime(541): Caused by: java.lang.ClassNotFoundException: android.view.shape
05-12 23:37:14.090: E/AndroidRuntime(541): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
05-12 23:37:14.090: E/AndroidRuntime(541): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
05-12 23:37:14.090: E/AndroidRuntime(541): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
05-12 23:37:14.090: E/AndroidRuntime(541): at android.view.LayoutInflater.createView(LayoutInflater.java:552)
05-12 23:37:14.090: E/AndroidRuntime(541): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:636)
05-12 23:37:14.090: E/AndroidRuntime(541): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
05-12 23:37:14.090: E/AndroidRuntime(541): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:653)
05-12 23:37:14.090: E/AndroidRuntime(541): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:678)
05-12 23:37:14.090: E/AndroidRuntime(541): ... 22 more
我错过了什么吗?