.NET for Android error XA1025

Example messages

error XA1025: The experimental 'Hybrid' value for the 'AndroidAotMode' MSBuild
property is not currently compatible with the armeabi-v7a target ABI. To
continue using the experimental 'Hybrid' value for 'AndroidAotMode', deselect
the armeabi-v7a target ABI in the Visual Studio project property pages or edit
the project file in a text editor and remove 'armeabi-v7a' from the
'AndroidSupportedAbis' MSBuild property.

Issue

The project has the AndroidAotMode MSBuild property set to the experimental Hybrid value and also includes the value armeabi-v7a in the AndroidSupportedAbis MSBuild property. Applications built with AndroidAotMode set to Hybrid currently abort during startup on armeabi-v7a devices, so the build exits with an error if this configuration is found.

Solution

If armeabi-v7a device compatibility is required for the app, the AndroidAotMode MSBuild property should be set to Normal or removed from the project file completely. To adjust the value of the AndroidAotMode MSBuild property, edit the project file in a text editor.

If armeabi-v7a device compatibility is not required for the app, then deselect the armeabi-v7a target ABI in the Visual Studio project property pages to resolve the build error.

In Visual Studio, the target ABIs can be adjusted under Supported architectures in the Advanced section of the Android Options tab of the project property pages

In Visual Studio for Mac, the target ABIs can be adjusted under Supported ABIs in the Advanced tab of the Android Build section of the project property pages.

Alternatively, edit the project file in a text editor and remove armeabi-v7a from the AndroidSupportedAbis MSBuild property by hand.