Home > Net >  Regenerating mipmap webp Icons from anydpi-v26 Version
Regenerating mipmap webp Icons from anydpi-v26 Version

Time:03-19

In Android Studio, when you create a new project, it uses a default icon and creates all the different required raster webp files (hdpi, mdpi, xhdpi, etc) based on the anydpi-v26 vector image.

I have updated my ic_launcher.xml (anydpi-v26) file, and want to automatically update the corresponding raster webp files without having to re-create each one by hand. I thought that building the project would take care of this, but it does not. Also, there does not appear to be a tool in Android Studio to do it for you.

Is there any way to regenerate the webp files from the vector version automatically, or am I stuck doing this manually, or scripting it?

CodePudding user response:

FWIW, for other folks looking for the answer to this question: if you are using API level 26 or higher, you can skip the mipmaps altogether and just use vectors instead. I'm doing this in my app now, and it's working just fine for me.

  • Related