Just upgraded from Android Studio 3.2.1 to 3.3. Previously my project - targeting SDK v28
- built without problems, now I get this build error:
- What went wrong: Execution failed for task ':app:processDebugResources'.
Android resource linking failed C:\app\src\main\res\mipmap-anydpi-v25\ic_launcher_round.xml: error: <adaptive-icon> elements require a sdk version of at least 26.
error: failed linking file resources.
Obviously, I have an <adaptive-icon>
resource in the mipmap-anydpi-v25
folder.
So, which AS version handles this correctly; 3.2.1 or 3.3? Should I remove my v25
icon? I thought Lollipop had support for this type of icons...
which AS version handles this correctly; 3.2.1 or 3.3?
Presumably 3.3, since adaptive icons were added in Android 8.0 (API Level 26).
Should I remove my v25 icon?
Change the directory to mipmap-anydpi-v26/
, and you can still use that icon for Android 8.0+. If your minSdkVersion
is below that (and I assume that it is), you will need an alternative implementation of the icon for the older devices.
I thought Lollipop had support for this type of icons...
Lollipop is Android 5.x, API Level 21-22. Your -v25
directory would not be used for those API levels.
For me, in AS 3.4, I had to:
It did not work for me to be able use add New | Image Asset due to the Adaptive Icons UNTIL I did that final step of remove SDK 25 from the list even after trying to correctly select the Project SDK and the Build Target.
I had tried several things and this was the final step that made it work for me. I don't know if this is particular to something in my configuration, but this got me past it.
I had the same problem, the reason was I messed up with the files manually but I didn't notice it until the update. In my case, after update to AS 3.3, the files in conflict were:
Although AS builds with without errors by changeing the min sdk "minSdkVersion 26" on app/build.gradle, it isn't practical for publishing purposes. the easy quick solution was:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With