這是在Android Studio中包含我的錯誤的代碼。Android Studio Drawable Folder
錯誤說
渲染問題注:此項目包含資源的錯誤,所以AAPT沒有成功,這可能會導致渲染失敗。首先解決資源問題。
Couldn't resolve resource @drawable/chrysanthemum
下面是我在類型activity_main.xml中
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".MainActivity">
<ImageView
android:id="@+id/imageView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="@drawable/chrysanthemum"
</ImageView>
</RelativeLayout>
請幫我解決這個難題的代碼。這實際上是我第一次使用Android Studio。我對這個軟件真的很陌生。
檢查我的答案 –
爲什麼不正確關閉ImageView標記? –
我編輯它,仍然是相同的,但它提供了一個新的音符錯誤 無法將drawable/tulipsflower轉換爲可繪製的 – len