Google play developer doesn't accept apk with vector drawable as the app icon

409 views Asked by At

I'm trying to upload my first app on the google play and I face error of

Upload failed: You need to check the icon inside your APK because it is not valid.

What I did is simple. Created and vector drawable icon and used it as the launcher icon for my app but it seems apk with vector drawables as the app icon is not acceptable with google play. I searched around about the ways I could convert my vector drawable to png but no success so far. The only solution remains is to convert vector to svg by hand and convert the svg to png and again import it to the android studio. Must say google play accept png format as the launcher icon and some apps like zapya can not show vector drawable icons which is assigned as the launcher.

Any suggestion to solve this problem or at least converting vector drawable to the png in a simple way?

1

There are 1 answers

0
Jon Goodwin On

All you need to do is:

  1. Render the Vector in an ImageView
  2. Get the Bitmap from the ImageView
  3. Save the Bitmap to a PNG file

For some code see (it's exactly the same question, I just answered it ;O) ):
Convert Android vector drawable to launcher icon PNG