0

I am simply trying to add an image to my android activity but I get the following error:

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

As you can see the error makes no sense, at least to me. The file name contains only a-z 0-9_. Agh Why am I getting this error?

Here is what is in the layout file:

    <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" />

I thank you for any help.

0

2 Answers 2

2

Change it to restlogo.png or rest_logo.png. When they say a-z, they literally mean only the lowercase a-z.

Sign up to request clarification or add additional context in comments.

Comments

1
res\drawable-hdpi\restLogo.png:

Image name should be in lowercase , so change it to restlogo.png or whatever but in lowercase

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.