1
我是Android開發新手。我正在嘗試使用XML文件爲我的第一個應用創建啓動畫面。然而,它給我下面的錯誤消息:<item>標籤需要'可繪製'屬性或子標籤定義可繪製
Rendering Problems Couldn't resolve resource @color/blue Failed to convert @color/blue into a drawable (Details) <item> tag requires a 'drawable' attribute or child tag defining a drawable
我看了所有的地方,試圖找出如何獲得可繪製工作,卻找不到了。
這裏是我的代碼:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@color/blue"/>
<item>
<bitmap
android:gravity="center"
android:src="@mipmap/ic_launcher"/>
</item>
</layer-list>