I am completel开发者_如何学Cy new with Android/Eclipse. I can't figure out how to add an image in the /res/drawable
folder of my Android Eclipse project.
Copy the image CTRL + C then in Eclipse select drawable folder, right click -> Paste
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.
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.
Right click on drawable folder_new_file- click on advanced button_ link to file in the file system_ then click on browse. finish
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.
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"
Do you want to add an image from your computer? Just right click the folder in Eclipse and click Import
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.
Open folder path of Android application, open src
folder then Add your image in /res/drawable
folder
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!
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 .
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
精彩评论