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

AndroidEclipseImageResources

Android Problem Overview


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.

Android Solutions


Solution 1 - Android

Copy the image CTRL + C then in Eclipse select drawable folder, right click -> Paste

Solution 2 - Android

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.

Solution 3 - Android

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.

Solution 4 - Android

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

Solution 5 - Android

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.

Solution 6 - Android

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"

Solution 7 - Android

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

Solution 8 - Android

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.

Solution 9 - Android

Open folder path of Android application, open src folder then Add your image in /res/drawable folder

Solution 10 - Android

For Android Studio:

  1. Right click on res, new Image Asset

  2. On Asset type choose Action Bar and Tab Icons

  3. Choose the image path

  4. Give your image a name in Resource name

  5. Next->Finish

The image will be saved in the /res/drawable folder!

Solution 11 - Android

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 https://stackoverflow.com/questions/2518428/eclipse-how-do-i-refresh-an-entire-workspace-f5-doesnt-do-it

If that does not work you might wanna restart eclispe

Solution 12 - Android

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 .

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionRegis_AGView Question on Stackoverflow
Solution 1 - AndroidNikola DespotoskiView Answer on Stackoverflow
Solution 2 - AndroidomermuhammedView Answer on Stackoverflow
Solution 3 - AndroidSachin SurjanView Answer on Stackoverflow
Solution 4 - AndroidR3z4View Answer on Stackoverflow
Solution 5 - AndroidCrazyDartView Answer on Stackoverflow
Solution 6 - AndroidHemant Mendi RattaView Answer on Stackoverflow
Solution 7 - AndroidPikalingView Answer on Stackoverflow
Solution 8 - AndroidZach HView Answer on Stackoverflow
Solution 9 - AndroidAliView Answer on Stackoverflow
Solution 10 - AndroidChrisView Answer on Stackoverflow
Solution 11 - AndroidBercikView Answer on Stackoverflow
Solution 12 - AndroidHumphreyView Answer on Stackoverflow