0

When I first built my Android application the launcher logo was automatically set to this:

android:icon="@mipmap/ic_launcher" 

which shows the Android logo. Now I changed it (with the instruction of this link) to a flashlight picture. If I try to run my app everything is working fine and it is the right launcher logo (flashlight).

But I decided to take a new launcher logo, so I deleted the whole new folder which was created in my mipmap folder. At first, I changed the android:icon in the AndroidManifest.xml back to the ic_launcher.

But if I try to run the app again, my launcher logo is still the flashlight. But it should be the Android logo. What did I do wrong?

I followed the instruction again and tried to add a new .png file, but now not even the new mipmap-folder is created.

Is there something else I need to consider?

Community
  • 1
  • 1
TeaAge
  • 152
  • 1
  • 16
  • Make sure you import the new file properly like this: **right-click on res folder -> new -> Image Asset** and then choose the image, leaving the asset type to be Launcher icons. Now the icon will be properly added to mipmap and will be there for every screen size (mdpi, hdpi, xhdpi etc). – Vucko Jul 16 '16 at 16:31
  • For my first Image I did the right-click on my **app** and added the new Image Asset. But it worked, so this cannot be the problem – TeaAge Jul 16 '16 at 17:22
  • Android Studio shows this hint: 'Some existing files will be overwritten by this operation. Files which replace existing files are marked red in the preview above.' And it doesn't matter which path I have selected for my image. – TeaAge Jul 16 '16 at 17:27

1 Answers1

3

I could solve the problem by myself!

  1. I did the right-click on the app-folder
  2. I chose New -> Image Asset
  3. I checked the Image Checkbox as Asset Type and selected my desired path

BUT:

I forgot to review the Name. So ic_launcher was still selected!

That's why I got the following errors:

An icon with the same name already exists and will be overwritten.

And...

Some existing files will be overwritten by this operation. Files which replace existing files are marked red in the preview above.

So what you need to do is simply change the name of your image to something that is not flashlight or ic_launcher (i.e. flashlighttest , flashlight2 or ic_launcher2). Just make sure you will not overwrite an existing file!

TeaAge
  • 152
  • 1
  • 16