TeaAge
TeaAge

Reputation: 162

Change again the launcher logo in Android Studio 2.1.1

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?

Upvotes: 0

Views: 2226

Answers (1)

TeaAge
TeaAge

Reputation: 162

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!

Upvotes: 3

Related Questions