How do I fix APT206 - failed linking file resources and APT2259 'textEnd' is incompatible with attribute iconGravity errors?

Gorimar, Behzad 5 Reputation points
2023-03-20T05:08:57.3866667+00:00

I have a Xamarin Forms application that I am migrating to MAUI and I am getting the following 2 errors during compilation.

APT2259 'textEnd' is incompatible with attribute iconGravity (attr) flags [start=1, textStart=2].

APT2061 failed linking file resources.

User's image

Based on a previous similar post, I have performed the recommended actions such as:

Ensure all SDKs are up-to-date, close VS 2022 and delete the bin and obj directories and rebuild but this has not worked

I'm not sure if this error is indicating a missing or not compatible Xamarin library.

The APT2259 is occurring in a file called "mtrl_calendar_month_navigation.xml" on line 33 (style="?attr/materialCalendarYearNavigationButton")

User's image

The APT2061 is occurring on line 156 in the Xamarin build tools (outside the project) C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\33.0.26\tools\Xamarin.Android.Aapt2.targets

User's image

Here is a list of packages for the project

User's image

Thank you in advance.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,864 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,967 questions
{count} votes