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

前端 未结 12 1865
名媛妹妹
名媛妹妹 2021-01-30 10:19

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条回答
  • 2021-01-30 10:44

    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 .

    0 讨论(0)
  • 2021-01-30 10:48

    Thanks for the information .It helped me out as my project was somehow not visible in workspace therefore I had to insert the image from ECLIPSE IDE. Also another way to do it is: The image to be inserted should be copied ctrl+c and then right click on the drawable folder and PASTE it. The image comes in drawable folder using ECLIPSE IDE. You can use the image as an icon of the application using Manifest File-android:icon="@drawable/image_name"

    0 讨论(0)
  • 2021-01-30 10:50

    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.

    0 讨论(0)
  • 2021-01-30 10:52

    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.

    0 讨论(0)
  • 2021-01-30 10:52

    You just need to copy/cut and paste the images into drawable folder using windows/mac file explorer

    To refresh the workspace follow the steps mentioned in this question Eclipse: How do i refresh an entire workspace? F5 doesn't do it

    If that does not work you might wanna restart eclispe

    0 讨论(0)
  • 2021-01-30 10:53

    Do you want to add an image from your computer? Just right click the folder in Eclipse and click Import

    0 讨论(0)
提交回复
热议问题