<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<gradient
android:layout_width="match_parent"
android:angle="270"
android:centerColor="#4ccbff"
android:endColor="#24b2eb"
android:startColor="#24b2eb" />
<corners android:radius="5dp" />
</shape>
上面的代碼顯示就行「需要layout_height
屬性丟失」無機器人 - 需要layout_attribute缺少
&
「需要layout_height
和layout_width
屬性丟失」上線號。
它應該告訴你哪個屬性丟失。在第一種情況下看起來是layout_height,在第二種情況下看起來是layout_height和layout_width – 2013-04-26 06:12:18
是的,在第二種情況下,它在兩種佈局上都顯示錯誤。 我在代碼中包含了android:layout_height =「wrap_content」,但它顯示了相同的錯誤。 – 2013-04-26 06:17:28
其layout_height,而不是高度。 – 2013-04-26 06:18:37