This folder configuration ('v26') is unnecessary; 'minSdkVersion' is 26. Merge all the resources in this folder into 'mipmap-anydpi'
Asked Answered
H

1

6

I'm getting this message in the Code Analysis after setting my Min SDK to 26.

This folder configuration ('v26') is unnecessary; 'minSdkVersion' is 26. Merge all the resources in this folder into 'mipmap-anydpi'.

However, I don't know exactly what to do with this?

I have tried to reformat the existing folder into 'mipmap-anydpi' and then it gives me 20 error messages saying the icon is defined as both Bitmap and XML in every mipmap folder (hdpi, xhdpi etc.

There's also a button I can click to let Android studio handle it. The button says "Merge resources from -anydpi-v26 into mipmap-anydpi". However, when I click it, it just creates an empty XML file at the bottom. And that file complains that it doesn't have a root tag (no wonder, because it's empty). I also can't transfer the XML tags from the 26 folder into this folder because then I get another error message saying I have multiple roots, or that it can't find the XML schema.

How am I supposed to address this?

Hypertension answered 3/5, 2021 at 17:41 Comment(2)
Did you get any solution?Newsprint
@CoolorFool-SRS no :-(Hypertension
C
1

I have tried to reformat the existing folder into 'mipmap-anydpi' and then it gives me 20 error messages saying the icon is defined as both Bitmap and XML in every mipmap folder (hdpi, xhdpi etc.

You also need to remove all the ic_launcher.png files from your mipmap-mdpi/mipmap-hdpi etc. Then Android v26 and beyond would take the only launcher icon you have in mipmap-anydpi.

Also, as referenced in the comments to this SO answer you can even name that folder as just mipmap.

Copartner answered 26/4, 2022 at 9:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.