Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Xamarin.Android.Build.Tasks] Add XA1025 error for Hybrid AOT on armeabi-v7a #4966

Merged
merged 2 commits into from
Dec 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Documentation/guides/messages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ Please disable fast deployment in the Visual Studio project property pages or ed
+ XA1022: Specified reference Java library not found: {file}
+ [XA1023](xa1023.md): Using the DX DEX Compiler is deprecated.
+ [XA1024](xa1024.md): Ignoring configuration file 'Foo.dll.config'. .NET configuration files are not supported in Xamarin.Android projects that target .NET 6 or higher.
+ [XA1025](xa1025.md): The experimental 'Hybrid' value for the 'AndroidAotMode' MSBuild property is not currently compatible with the armeabi-v7a target ABI.
+ [XA1027](xa1027.md): The 'EnableProguard' MSBuild property is set to 'true' and the 'AndroidLinkTool' MSBuild property is empty, so 'AndroidLinkTool' will default to 'proguard'.
+ [XA1028](xa1028.md): The 'AndroidEnableProguard' MSBuild property is set to 'true' and the 'AndroidLinkTool' MSBuild property is empty, so 'AndroidLinkTool' will default to 'proguard'.

Expand Down
47 changes: 47 additions & 0 deletions Documentation/guides/messages/xa1025.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: Xamarin.Android error XA1025
description: XA1025 error code
ms.date: 11/08/2020
---
# Xamarin.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.
42 changes: 42 additions & 0 deletions Documentation/release-notes/xa1025.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#### Deprecations, removals, and default configuration changes

- [XA1025 error for Hybrid AndroidAotMode with incompatible armeabi-v7a target ABI](#xa1025-error-for-hybrid-androidaotmode-with-incompatible-armeabiv7a-target-abi)

### XA1025 error for Hybrid AndroidAotMode with incompatible armeabi-v7a target ABI

```
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.
```

Projects using the experimental `Hybrid` value for the `AndroidAotMode` MSBuild
property that also include the value `armeabi-v7a` in the `AndroidSupportedAbis`
MSBuild property will now see this build error to help indicate that
applications built with these settings would abort during startup on armeabi-v7a
ABI device environments ([GitHub Issue 1218][github-1218]).

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.

[github-1218]: https://github.com/xamarin/xamarin-android/issues/1218
4 changes: 4 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,10 @@ In this message, the term "binding" means a piece of generated code that makes i
<comment>The following are literal names and should not be translated: .NET, Xamarin.Android.
{0} - The file name such as 'Foo.dll.config'</comment>
</data>
<data name="XA1025" xml:space="preserve">
<value>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.</value>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One possible reason not to add this error message could be that, as far as I can find, the Hybrid setting for the $(AndroidAotMode) is undocumented, so adding an error message for it might in a small way lead to imprecise impressions about future availability and compatibility of the feature. Hopefully the fact that the message includes the term "experimental" right up front will minimize the risk of incorrect impressions.

<comment>The following are literal names and should not be translated: 'Hybrid', 'AndroidAotMode', armeabi-v7a, 'AndroidSupportedAbis'</comment>
</data>
<data name="XA1026" xml:space="preserve">
<value>Using AAPT is deprecated in favor of AAPT2. Please enable 'Use incremental Android packaging system (aapt2)' in the Visual Studio project property pages or edit the project file in a text editor and set the 'AndroidUseAapt2' MSBuild property to 'true'.</value>
<comment>The following are literal names and should not be translated: AAPT, AAPT2, Android, AndroidUseAapt2, true.</comment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,11 @@ In this message, the term "binding" means a piece of generated code that makes i
<note>The following are literal names and should not be translated: .NET, Xamarin.Android.
{0} - The file name such as 'Foo.dll.config'</note>
</trans-unit>
<trans-unit id="XA1025">
<source>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.</source>
<target state="new">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.</target>
<note>The following are literal names and should not be translated: 'Hybrid', 'AndroidAotMode', armeabi-v7a, 'AndroidSupportedAbis'</note>
</trans-unit>
<trans-unit id="XA2000">
<source>Use of AppDomain.CreateDomain() detected in assembly: {0}. .NET 6 will only support a single AppDomain, so this API will no longer be available in Xamarin.Android once .NET 6 is released.</source>
<target state="needs-review-translation">V sestavení {0} se zjistilo, že se používá AppDomain.CreateDomain(). .NET 5 bude podporovat jen jednu doménu AppDomain, proto toto rozhraní API už nebude po vydání rozhraní .NET 5 v Xamarin.Androidu k dispozici.</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,11 @@ In this message, the term "binding" means a piece of generated code that makes i
<note>The following are literal names and should not be translated: .NET, Xamarin.Android.
{0} - The file name such as 'Foo.dll.config'</note>
</trans-unit>
<trans-unit id="XA1025">
<source>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.</source>
<target state="new">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.</target>
<note>The following are literal names and should not be translated: 'Hybrid', 'AndroidAotMode', armeabi-v7a, 'AndroidSupportedAbis'</note>
</trans-unit>
<trans-unit id="XA2000">
<source>Use of AppDomain.CreateDomain() detected in assembly: {0}. .NET 6 will only support a single AppDomain, so this API will no longer be available in Xamarin.Android once .NET 6 is released.</source>
<target state="needs-review-translation">In der Assembly "{0}" wurde die Verwendung von "AppDomain.CreateDomain()" festgestellt. .NET 5 unterstützt nur eine einzelne AppDomain, sodass diese API nach dem Release von .NET 5 nicht mehr in Xamarin.Android verfügbar ist.</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,11 @@ In this message, the term "binding" means a piece of generated code that makes i
<note>The following are literal names and should not be translated: .NET, Xamarin.Android.
{0} - The file name such as 'Foo.dll.config'</note>
</trans-unit>
<trans-unit id="XA1025">
<source>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.</source>
<target state="new">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.</target>
<note>The following are literal names and should not be translated: 'Hybrid', 'AndroidAotMode', armeabi-v7a, 'AndroidSupportedAbis'</note>
</trans-unit>
<trans-unit id="XA2000">
<source>Use of AppDomain.CreateDomain() detected in assembly: {0}. .NET 6 will only support a single AppDomain, so this API will no longer be available in Xamarin.Android once .NET 6 is released.</source>
<target state="needs-review-translation">Se detectó el uso de AppDomain.CreateDomain() en el ensamblado: {0}. En .NET 5 solo se admitirá una instancia de AppDomain, por lo que esta API ya no estará disponible en Xamarin.Android una vez que se haya lanzado .NET 5.</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,11 @@ In this message, the term "binding" means a piece of generated code that makes i
<note>The following are literal names and should not be translated: .NET, Xamarin.Android.
{0} - The file name such as 'Foo.dll.config'</note>
</trans-unit>
<trans-unit id="XA1025">
<source>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.</source>
<target state="new">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.</target>
<note>The following are literal names and should not be translated: 'Hybrid', 'AndroidAotMode', armeabi-v7a, 'AndroidSupportedAbis'</note>
</trans-unit>
<trans-unit id="XA2000">
<source>Use of AppDomain.CreateDomain() detected in assembly: {0}. .NET 6 will only support a single AppDomain, so this API will no longer be available in Xamarin.Android once .NET 6 is released.</source>
<target state="needs-review-translation">Utilisation de AppDomain.CreateDomain() détectée dans l'assembly {0}. .NET 5 prend uniquement en charge un seul AppDomain. Cette API ne sera donc plus disponible dans Xamarin.Android après la publication de .NET 5.</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,11 @@ In this message, the term "binding" means a piece of generated code that makes i
<note>The following are literal names and should not be translated: .NET, Xamarin.Android.
{0} - The file name such as 'Foo.dll.config'</note>
</trans-unit>
<trans-unit id="XA1025">
<source>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.</source>
<target state="new">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.</target>
<note>The following are literal names and should not be translated: 'Hybrid', 'AndroidAotMode', armeabi-v7a, 'AndroidSupportedAbis'</note>
</trans-unit>
<trans-unit id="XA2000">
<source>Use of AppDomain.CreateDomain() detected in assembly: {0}. .NET 6 will only support a single AppDomain, so this API will no longer be available in Xamarin.Android once .NET 6 is released.</source>
<target state="needs-review-translation">È stato rilevato l'uso di AppDomain.CreateDomain() nell'assembly: {0}. .NET 5 supporterà solo un'unica istanza di AppDomain, di conseguenza questa API non sarà più disponibile in Xamarin.Android dopo il rilascio di .NET 5.</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,11 @@ In this message, the term "binding" means a piece of generated code that makes i
<note>The following are literal names and should not be translated: .NET, Xamarin.Android.
{0} - The file name such as 'Foo.dll.config'</note>
</trans-unit>
<trans-unit id="XA1025">
<source>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.</source>
<target state="new">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.</target>
<note>The following are literal names and should not be translated: 'Hybrid', 'AndroidAotMode', armeabi-v7a, 'AndroidSupportedAbis'</note>
</trans-unit>
<trans-unit id="XA2000">
<source>Use of AppDomain.CreateDomain() detected in assembly: {0}. .NET 6 will only support a single AppDomain, so this API will no longer be available in Xamarin.Android once .NET 6 is released.</source>
<target state="needs-review-translation">アセンブリ {0} で AppDomain.CreateDomain() が使用されていることが検出されました。.NET 5 では単一の AppDomain のみがサポートされる予定のため、.NET 5 がリリースされるとこの API は Xamarin.Android では使用できなくなります。</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,11 @@ In this message, the term "binding" means a piece of generated code that makes i
<note>The following are literal names and should not be translated: .NET, Xamarin.Android.
{0} - The file name such as 'Foo.dll.config'</note>
</trans-unit>
<trans-unit id="XA1025">
<source>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.</source>
<target state="new">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.</target>
<note>The following are literal names and should not be translated: 'Hybrid', 'AndroidAotMode', armeabi-v7a, 'AndroidSupportedAbis'</note>
</trans-unit>
<trans-unit id="XA2000">
<source>Use of AppDomain.CreateDomain() detected in assembly: {0}. .NET 6 will only support a single AppDomain, so this API will no longer be available in Xamarin.Android once .NET 6 is released.</source>
<target state="needs-review-translation">{0} 어셈블리에서 AppDomain.CreateDomain() 사용이 검색되었습니다. .NET 5는 단일 AppDomain만 지원하므로 .NET 5가 릴리스되면 이 API는 Xamarin.Android에서 더는 사용할 수 없습니다.</target>
Expand Down
Loading