Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot replace default icon in android studio

The image I am trying to replace the default icon with is 512x512px .png. To change the icon I go app/res [new; image asset;...]. It won't let me replace or create new icon set in the @drawable. My most recent thought are that I might not have unlocked some priveges but I am able edit contents of drawable by directly accessing it's location

Any ideas?

like image 451
Samuel Hošovský Avatar asked Feb 09 '23 23:02

Samuel Hošovský


2 Answers

Place your icon in the drawable folder and then simply open your AndroidManifest.xml file and then set the icon you want like this ...

<application
    android:icon="@drawable/icon"
    .... >
like image 52
Zubair Akber Avatar answered Feb 15 '23 11:02

Zubair Akber


The new version of android studio put default launcher icon(ic_launcher.png) in mipmap-xxx directories, so just copy and paste your new icon to these directores, and reference it as '@mipmap/you_icon', or in code 'R.mipmap.you_icon'. If you still want to use the keyword 'drawable', then create the drawable folders(drawable-xxx), and put your icon there, and reference it as '@drawable/you_icon', or in code 'R.drawable.you_icon'

like image 23
wrkwrk Avatar answered Feb 15 '23 10:02

wrkwrk