9

I made my own icon for my Android app, but I am a beginner in Android Studio, and it is not importing into my already existing Android Studio project.

I read to just use the Android Launcher Icon Generator from Android Asset Studio, which then creates a zip file for you, which should be placed inside your project res folder. I basically replaced the old res folder with the new one, and I checked and all the new icons are in their right folders, i.e. drawable-hdpi, drawable-mdpi, etc within my project directory, but they are not in the res folder of my project pane of Android Studio.

However, I restarted Android Studio, and it did not refresh to show these new imports. When I run my project, it still shows the old standard ic-launcher.png files.

Azurespot
  • 3,066
  • 3
  • 45
  • 73
  • Yes, the unzipped file is called 'res' and has only all the drawable folders in it, with each icon size in each folder. – Azurespot Mar 13 '14 at 06:09
  • 1
    Yes, I just tried it. I wouldn't replace the original res folder with the one in the zipped file; it's incomplete. You'll likely lose some other resources if you're not careful. Did you extract the files properly? Have you tried just copy/paste-ing the files in the existing res/drawable folders? – ChiefTwoPencils Mar 13 '14 at 06:10
  • Ah thanks, I tried to drag/drop (didn't work) and then copy/paste (didn't work), but I tried one more time to copy/paste and it worked! Thanks, hard to say why it didn't work before. Maybe opening/closing the folder again helped. – Azurespot Mar 13 '14 at 06:16
  • Try this http://stackoverflow.com/a/28704026/3758898 You can use Scaled Drawable for you custom icon. – Kishan Vaghela Oct 06 '15 at 05:21

4 Answers4

16

right click on res folder, selecting New > Image Asset. browse image file, should do the job for you

YesItsMe
  • 1,709
  • 16
  • 32
  • its interesting that this approach automatically creates the icons for all screen densities (and creates the mipmap directories if they don't exist). I found this quite helpful. But I also needed to import custom made images (e.g. actionBar). This approach does not work for images like this that you want to put in a drawable directory. Nor can you drag and drop images into the drawable directories. Instead for drawables, simply copy the image and then right click on the desired directory and paste the image into the directory). – JeffB6688 Mar 07 '15 at 00:08
  • 1
    this process only accepts one image and scales it to every density needed . but if i have custom made icon for every resolution and i want to use it. what would i do ? – Sagar Nayak Mar 21 '16 at 04:11
0

You can change the icon by going in the AndroidManifest.xml of your project, look for the Application tab below the status bar(if that's what it is called) then look for the Icon label/text click the Browse... button beside the textarea then it will prompt a Resource Chooser dialog. Click the Create New Icon; it will show Create Asset Set dialog, you can proceed to the next dialog by clicking the Next button, configure the icon set by selecting whether it is image or text or clipart that you want for the icon.

When you click the image button, it will the path of your old image, you can select your new image by clicking Browse -> directory to your new image. Select your desired scaling, shape and background for the other fields or settings. Click Finish, it will prompt that the file already exists and will change all the ic_launcher.png in your /res folder, just click Yes to All. Then it's now updated to your new image.

  • Thanks Kuro, but I could not find a browse button near the text of my icon name. :( The Android Manifest does not seem to have any buttons when I click on or near (or hover) over the icon name. – Azurespot Mar 14 '14 at 05:10
0

Very easy. Just copy your generated icon paste it in drawable folder as follows.

Suppose generated icons are in those folders:

enter image description here

Then go to every folder, copy the icon and paste in drawable folder. Android studio will ask to select a folder, paste it to corresponding folder.

enter image description here

Don't worry for first icon, after pasting second icon, android studio automatically create folder structure.

I know there are other proper ways to import custom icon, but this easy and not thinkable way

Community
  • 1
  • 1
Moshi
  • 1,385
  • 2
  • 17
  • 36
0

Here is the link https://developer.android.com/studio/write/image-asset-studio for Documentation for actual Answer from @YesItsMe Scroll down until you see: "Run Image Asset Studio

To start Image Asset Studio, follow these steps:

In the Project window, select the Android view. Right-click the res folder and select New > Image Asset."

abdimuna
  • 775
  • 9
  • 16