6

While trying to upload my apk im getting this error..."You need to check the icon inside your APK because it is not valid."

Manifest Code

<application
    android:allowBackup="true"
    android:icon="@drawable/wallet_logo"
    android:label="Wallet"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">

My logo is a vector asset

Kamalnrf
  • 194
  • 2
  • 13

4 Answers4

6

The app icon specifically (ic_launcher or whatever) must be in mipmap now, since Google play rejects any builds with the app icon in drawable folders.

box
  • 3,592
  • 1
  • 30
  • 35
  • What do you mean by "mipmap"? "Bitmap" maybe? And what do you mean by app icons not allowed in drawable folder? – jerone Nov 25 '16 at 13:41
  • @jerone Not Bitmap! but mipmap-hdpi, mipmap-mdpi, etc. You reference this similarly as drawable, but like this: R.mipmap.ic_launcher . As "app icons" i mean specifically icons that are meant for application icon in the launcher, not icons in general, but only the icon that represents you application icon. You should put all of those inside mipmap-xxx and not keep it in drawable-xxx anymore, since Google play will reject it with: "You need to check the icon inside your APK because it is not valid." – box Nov 25 '16 at 13:48
  • 1
    @jerone You can read this https://androidbycode.wordpress.com/2015/02/14/goodbye-launcher-drawables-hello-mipmaps/ and this https://developer.android.com/studio/write/image-asset-studio.html for any further explanations. – box Nov 25 '16 at 13:50
  • Make sure that you specify all of them! E.g. mipmap-ldpi, mipmap-mdpi, mipmap-hdpi, mipmap-xhdpi, mipmap-xxhdpi and mipmap-xxxhdpi. If you forget one of them then Google may reject the whole apk. – nagylzs Nov 25 '16 at 13:57
  • No need to specifiy mipmap-ldpi imho, I didn't and I was able to upload it also, but as a precaution the best way is to have all resolutions covered. – box Nov 25 '16 at 14:20
  • what do you mean by mipmap ? – Ersin Gülbahar Nov 25 '16 at 14:23
  • @ErsinGülbahar Pls read the comments...its a folder, the same as drawable. – box Nov 25 '16 at 14:27
  • Just found this out when I tried to publish my app. I can recommend this for generating mipmaps from your original png icon: https://romannurik.github.io/AndroidAssetStudio/ – David Christopher Reynolds Nov 25 '16 at 15:53
2

Your launcher icon should be in png format. Read this. You should probably follow this convention and convert your vector to png and it should work.

Vucko
  • 7,000
  • 2
  • 21
  • 42
1

This may be happening because of some of the following reasons: 1)your launcher image size is too big and installing the apk may crash the UI 2)Launcher icon is not in the mipmap folder 3)Launcher image is not in PNG.

Follow this link to make good launcher images which will not behave weirdly nor have weird outputs.

https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html#foreground.type=image&foreground.space.trim=1&foreground.space.pad=0.25&foreColor=rgba(96%2C%20125%2C%20139%2C%200)&backColor=rgb(255%2C%20235%2C%2059)&crop=0&backgroundShape=square&effects=shadow&name=ic_launcher

Rahul Soshte
  • 118
  • 8
1

It's worked for me, Replaces my app icon with below Android guidelines icon:

512 x 512, 32-bit PNG (with alpha)

And place the icon in mipmap folder not in drawable folder.

Community
  • 1
  • 1
Phani varma
  • 417
  • 5
  • 7