Search code examples
androidandroid-studioassetsmissing-data

Android Studio's Image Asset Studio won't recognize png file in file system


I have a png file named triedsohardicon.png I want to use for my app's launcher icon, but after putting it in the folder associated with the project, I find that Image Asset Studio doesn't show any triedsohardicon.png in its file system browser in that location.

In addition, if I put the line android:icon="@drawable/triedsohardicon" in AndroidManifest.xml (because I did in fact put the png file in the TriedSoHard/app/src/main/res/drawable folder), the text in quotes just returns the error "Cannot resolve symbol '@drawable/triedsohardicon'".

The png has dimensions 512x512. I could use some help, please.


Solution

  • Launcher Icon should be placed in mipmap res\mipmap\triedsohardicon.png

    Place your launcher Icon through Image Asset like below:

    enter image description here

    Upload and Save the png and it will be placed in mipmap automatically.

    In Maifest:

    android:icon="@mipmap/triedsohardicon"
    

    Hope this helps.