Android/Eclipse: how can I add an image in the res

2019-03-08 02:53发布

I am completely new with Android/Eclipse. I can't figure out how to add an image in the /res/drawable folder of my Android Eclipse project.

12条回答
混吃等死
2楼-- · 2019-03-08 03:14

When inserting an image into the drawable folders, another import point in addition to the "no capital letters" rule is that the image name cannot contain dashes or other special characters.

查看更多
欢心
3楼-- · 2019-03-08 03:17

Just copy the image and paste into Eclipse in the res/drawable directory. Note that the image name should be in lowercase, otherwise it will end up with an error.

查看更多
Melony?
4楼-- · 2019-03-08 03:22

You can just put it in on the file system. Eclipse will pick up the change on the next refresh. Click the folder and press F5 to refresh. BTW, make sure the file name does not have any capital letters... it will break android... and eclipse will let you know.

查看更多
Emotional °昔
5楼-- · 2019-03-08 03:24

Drop in the image in /res/drawable folder. Then in Eclipse Menu, do ->Project -> Clean. This will do a clean build if set to build automatically.

查看更多
戒情不戒烟
6楼-- · 2019-03-08 03:25

Right click on drawable folder_new_file- click on advanced button_ link to file in the file system_ then click on browse. finish

查看更多
在下西门庆
7楼-- · 2019-03-08 03:28

Try to use jpg and png , also name your image in lowercase. Then drag and drop the image in res/drawable . then go to file and click save all . close eclipse then reopen it again . That is what worked for me .

查看更多
登录 后发表回答