sara brown
sara brown

Reputation: 1077

Android add new image gives error

This might seems silly but seriously I don't even know why it reacts that way. I am using eclipse JUNO, and I just trying out simple program enables me to put an image inside the layout after my real program said it have the error.

The project shows the error icon but when looking all in the subs-project like the class, layout everything, it is crystal clear. You can see it like the picture above.

enter image description here

I have making an android project before I am updating the adt and stuff. Before this, all I do just put any picture(s) I want in any folder drawable. I believe this is the right step and I know I do the same thing in here but it have issue with it. I even search on the basic tutorial how to put the image and it did the same why I did.

Does anyone knows what had happen here?

Upvotes: 0

Views: 177

Answers (4)

Arun Kris
Arun Kris

Reputation: 11

Just check your Problems tab in Eclipse. You can find it from

Window > Show View > Problems.

There you can find the error description.

Upvotes: 1

Praveenkumar
Praveenkumar

Reputation: 24506

As per user inazaruk's answer, Hence the reason for not using special characters inside file names, as they can no be used in Java names.

As for capital letters, I guess that's to avoid one little problem in Windows vs. Linux environment. That's because Linux thinks that Icon.png and icon.png are different files, and Windows thinks that Icon.png and icon.png is the same file. So anyone using Linux can create application that is not compilable on Windows.

So, change your Humanpng with human Also don't use the extension png as picture name.

Upvotes: 1

Pranav Sharma
Pranav Sharma

Reputation: 684

Capital letters , and some symbols are not allowed to be in the name of the png file , update the name of the png file , . make it in smaall letters

Upvotes: 1

Athul Harikumar
Athul Harikumar

Reputation: 2491

Android dont allow image names to contain capital letters in drawable folder change the name to contain only small letters

Upvotes: 1

Related Questions