Most of the posts I found related to this issue were created when Maui was still in beta.
This issue affected the Android build only! The iOS build worked the first time.
Following this Microsoft Maui tutorial, I experienced a build issue right out the gate. The error was APT2260: resource mipmap/appicon and mipmap/appicon_round not found.
In the resources folder there was no appicon_round.svg file, so I copied appicon.svg to appicon_round.svg and tried a rebuild and got the same error.
I deleted android:roundIcon="@mipmap/appicon_round" from AndroidManifest.xml, and deleted the appicon_round.svg file I created via a copy action, but the build still failed.
Even though appicon.svg did exist, I removed android:icon="@mipmap/appicon" from AndroidManifest.xml, and the rebuild was successful. 🤦🏻♂️
Finally, I used Inkscape to create appicon_round.svg, I added it to the projects Resources/AppIcon folder, and then added android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" back to the AndroidManifest.xml file. The following build was successful.
First thing to note is that, while Visual Studio 2022 for MacOS did create the appicon.svg file, it did not generate the appicon_round.svg when I created the Multi-Platform project.
The second "gotcha" for me was when I removed the round SVG reference from the Android manifest file, but the build still failed.
Sometimes I face the same build error while trying to deploy MAUI app to Android device in Release mode via Visual Studio for Mac.
The solution that works in my case is also simple:
bin and obj folders.Visual Studio for Mac.Build -> Build solution.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