I do as it is written in the textbook: res -> New -> Image Asset, etc. It would seem simple, but already broke the whole head. Moreover, if I download someone else's source with a custom icon, then everything works fine. What's wrong?!

Manifesto

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.androidtest.iconchange"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> 

res folder structure:

-layout

-mipmap-hdpi

-mipmap-mdpi

-mipmap-xhdpi

-mipmap-xxhdpi

-mipmap-xxxhdpi

-values

The mipmap folders contain png files of icons of the required sizes (from 48x48 to 192x192).

  • No need to code as a link to a third-party resource. The link will be rotten and the question will lose its meaning. Give the code in the text directly in question. Also show the project folder structure. More specifically - src/main/res/ - Yuriy SPb
  • understood corrected. I hope for your help. - Georg
  • one
    Well ... It seems that you have everything right ... Try InstantRun off InstantRun in the studio settings. And surely you have the necessary icon in all 5 folders? - Yuriy SPb
  • The problem really was in the included InstantRun. I never would have thought of it. Thank you very much, Yuri! - Georg
  • Please) When you work with Google products, you need to be ready for disappointment) - Yuriy SPb

1 answer 1

The solution was very simple. You just need to turn off InstantRun .

File -> Settings -> Build, Execution, Deployment -> Instant Run - uncheck Enable Instant Run ...