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.
问题:
回答1:
Copy the image CTRL + C then in Eclipse select drawable folder, right click -> Paste
回答2:
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.
回答3:
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.
回答4:
Right click on drawable folder_new_file- click on advanced button_ link to file in the file system_ then click on browse. finish
回答5:
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.
回答6:
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"
回答7:
Do you want to add an image from your computer? Just right click the folder in Eclipse and click Import
回答8:
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.
回答9:
Open folder path of Android application, open src
folder then Add your image in /res/drawable
folder
回答10:
For Android Studio:
Right click on res, new Image Asset
On Asset type choose Action Bar and Tab Icons
Choose the image path
Give your image a name in Resource name
Next->Finish
The image will be saved in the /res/drawable folder!
回答11:
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 .
回答12:
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