Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio compiles old icon

I started an Android project using the default icon (ic_launcher) using Android Studio. But now I want to change the icon to something else. I tried replacing all the ic_launcher.pngs in the project directory, copying the icons under a new name and change the AndroidManifest.xml but the app still has the old ic_launcher. I also tried restarting Android Studio, Invalidate Cache and Restart, uninstall the app from the device but the icon never changed.

PS : Removing the android:icon="@drawable/logo" (NOTE : I changed ic_launcher.png to logo.png to see if it works then) changed the icon to the default android icon. But putting it back still gives me the same old one.

Is there a different procedure to change the icon of an app using Android Studio?

like image 675
Thahzan Avatar asked Jul 02 '14 07:07

Thahzan


4 Answers

In Android Studio 1.5.1, here what worked for me :

  1. Add this line in manifest application part after the label

    android:label="@string/my_app"

    android:icon="@mipmap/ic_launcher"

  2. Clean your app

  3. Restart your phone
  4. Launch it, it should be OK!

Good Luck

like image 102
Sandy2626 Avatar answered Oct 07 '22 01:10

Sandy2626


I don't know what is the exact problem (Android Studio even showed the correct icon in the preview despite the app having the incorrect icon) but I resolved it by copying the same icon under a different name and changing the Manifest accordingly.

like image 30
Thahzan Avatar answered Nov 11 '22 19:11

Thahzan


I had the same problem in Android Studio. All that was required was selecting Build -> Clean Project from the menu and then build again. After that, the correct icon appeared in the compiled APK file.

like image 4
mydoghasworms Avatar answered Nov 11 '22 19:11

mydoghasworms


In Android Studio 3.6 I was also facing the same problem. I just restarted my phone and every thing was fine. I hope that you just have to restart your phone.

like image 4
Zeeshan Ali Avatar answered Nov 11 '22 21:11

Zeeshan Ali