0

Androidアクティビティに画像を追加しようとしていますが、次のエラーが発生します。

res\drawable-hdpi\restLogo.png: Invalid file name: must contain only [a-z0-9_.]

ご覧のとおり、少なくとも私にとっては、エラーは意味がありません。ファイル名にはaz0-9_のみが含まれます。ああ、なぜこのエラーが発生するのですか?

レイアウトファイルの内容は次のとおりです。

    <ImageView
    android:id="@+id/imageView2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_below="@+id/imageView1"
    android:contentDescription="@string/Logo" 
    style=""
    android:src="@drawable/restLogo" />

助けてくれてありがとう。

4

2 に答える 2

2

restlogo.pngまたはに変更しrest_logo.pngます。彼らが言うときa-z、彼らは文字通り小文字だけを意味しa-zます。

于 2013-01-11T18:52:11.923 に答える
1
res\drawable-hdpi\restLogo.png:

画像名は小文字である必要があるため、restlogo.pngまたは小文字以外に変更してください

于 2013-01-11T18:53:35.833 に答える