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 to replace everything ic_launcher.pngin the project directory by copying the icons under the new name and changing AndroidManifest.xml, but the application still has the old one ic_launcher. I also tried restarting Android Studio, Invalidate Cache and Restart, uninstalling the application from the device, but the icon did not change.

PS: Uninstall android:icon="@drawable/logo"(NOTE: I changed ic_launcher.pngto logo.pngto see if it works) changed the icon to the default Android icon. But, returning him, he gives me the same old.

Is there any other procedure for changing the application icon using Android Studio?

+5
source share
8 answers

I don’t know what kind of problem (Android Studio even showed the correct icon in the preview, despite the fact that the application has the wrong icon), but I solved it by copying the same icon under a different name and changing the manifest accordingly.

+4
source

I had the same issue in Android Studio. All that was required was to select Build -> Clean Projectfrom the menu and then recreate. After that, the correct icon appeared in the compiled APK file.

+4
source

Android Studio 1.5.1 , :

  • android:label="@string/my_app"

    android:icon="@mipmap/ic_launcher"

  • .
  • , !

+1

. , refactor- > . .

0

, : icon = "@drawable/ic_launcher"   

0
  1. , , .
  2. , , NEW "image image". , .
  3. "" "", . , , , , .
0

, / . ic_launcher.xml . , , .

: -Delete ic_launcher.xml -Add AndroidManifest.xml

: android: icon = "@mipmap/example_icon"

0

in my case it was the svg file that I used to create the image resource. I create a new SVG file without errors, then it worked fine, I also try to change the SVG file for a PNG file, it worked like a charm! Hope this helps.

0
source

Source: https://habr.com/ru/post/1546796/


All Articles