diff --git a/Documentation/guides/messages/README.md b/Documentation/guides/messages/README.md index dab26868e44..54dcee9c8dd 100644 --- a/Documentation/guides/messages/README.md +++ b/Documentation/guides/messages/README.md @@ -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'. diff --git a/Documentation/guides/messages/xa1025.md b/Documentation/guides/messages/xa1025.md new file mode 100644 index 00000000000..652ae901274 --- /dev/null +++ b/Documentation/guides/messages/xa1025.md @@ -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. diff --git a/Documentation/release-notes/xa1025.md b/Documentation/release-notes/xa1025.md new file mode 100644 index 00000000000..989e9ca6df6 --- /dev/null +++ b/Documentation/release-notes/xa1025.md @@ -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 diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx index 19f5bd7a4b6..e61481af702 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx @@ -435,6 +435,10 @@ In this message, the term "binding" means a piece of generated code that makes i The following are literal names and should not be translated: .NET, Xamarin.Android. {0} - The file name such as 'Foo.dll.config' + + 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. + The following are literal names and should not be translated: 'Hybrid', 'AndroidAotMode', armeabi-v7a, 'AndroidSupportedAbis' + 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'. The following are literal names and should not be translated: AAPT, AAPT2, Android, AndroidUseAapt2, true. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.cs.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.cs.xlf index b0a4d109795..4d06f645bbd 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.cs.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.cs.xlf @@ -433,6 +433,11 @@ In this message, the term "binding" means a piece of generated code that makes i The following are literal names and should not be translated: .NET, Xamarin.Android. {0} - The file name such as 'Foo.dll.config' + + 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. + 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. + The following are literal names and should not be translated: 'Hybrid', 'AndroidAotMode', armeabi-v7a, 'AndroidSupportedAbis' + 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. 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. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.de.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.de.xlf index 40376a033b5..bf10d050d47 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.de.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.de.xlf @@ -433,6 +433,11 @@ In this message, the term "binding" means a piece of generated code that makes i The following are literal names and should not be translated: .NET, Xamarin.Android. {0} - The file name such as 'Foo.dll.config' + + 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. + 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. + The following are literal names and should not be translated: 'Hybrid', 'AndroidAotMode', armeabi-v7a, 'AndroidSupportedAbis' + 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. 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. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.es.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.es.xlf index 7f5fbed6c5e..eb65dc7bb16 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.es.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.es.xlf @@ -433,6 +433,11 @@ In this message, the term "binding" means a piece of generated code that makes i The following are literal names and should not be translated: .NET, Xamarin.Android. {0} - The file name such as 'Foo.dll.config' + + 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. + 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. + The following are literal names and should not be translated: 'Hybrid', 'AndroidAotMode', armeabi-v7a, 'AndroidSupportedAbis' + 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. 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. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.fr.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.fr.xlf index db0bda2ef26..4a63a6a6cd2 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.fr.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.fr.xlf @@ -433,6 +433,11 @@ In this message, the term "binding" means a piece of generated code that makes i The following are literal names and should not be translated: .NET, Xamarin.Android. {0} - The file name such as 'Foo.dll.config' + + 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. + 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. + The following are literal names and should not be translated: 'Hybrid', 'AndroidAotMode', armeabi-v7a, 'AndroidSupportedAbis' + 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. 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. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.it.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.it.xlf index c02d0a43649..61cdf85c413 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.it.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.it.xlf @@ -433,6 +433,11 @@ In this message, the term "binding" means a piece of generated code that makes i The following are literal names and should not be translated: .NET, Xamarin.Android. {0} - The file name such as 'Foo.dll.config' + + 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. + 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. + The following are literal names and should not be translated: 'Hybrid', 'AndroidAotMode', armeabi-v7a, 'AndroidSupportedAbis' + 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. È 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. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ja.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ja.xlf index edfc2876006..81a53fcbf70 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ja.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ja.xlf @@ -433,6 +433,11 @@ In this message, the term "binding" means a piece of generated code that makes i The following are literal names and should not be translated: .NET, Xamarin.Android. {0} - The file name such as 'Foo.dll.config' + + 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. + 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. + The following are literal names and should not be translated: 'Hybrid', 'AndroidAotMode', armeabi-v7a, 'AndroidSupportedAbis' + 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. アセンブリ {0} で AppDomain.CreateDomain() が使用されていることが検出されました。.NET 5 では単一の AppDomain のみがサポートされる予定のため、.NET 5 がリリースされるとこの API は Xamarin.Android では使用できなくなります。 diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ko.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ko.xlf index 5c358459eae..6dbe735757b 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ko.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ko.xlf @@ -433,6 +433,11 @@ In this message, the term "binding" means a piece of generated code that makes i The following are literal names and should not be translated: .NET, Xamarin.Android. {0} - The file name such as 'Foo.dll.config' + + 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. + 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. + The following are literal names and should not be translated: 'Hybrid', 'AndroidAotMode', armeabi-v7a, 'AndroidSupportedAbis' + 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. {0} 어셈블리에서 AppDomain.CreateDomain() 사용이 검색되었습니다. .NET 5는 단일 AppDomain만 지원하므로 .NET 5가 릴리스되면 이 API는 Xamarin.Android에서 더는 사용할 수 없습니다. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pl.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pl.xlf index fd597131fe0..5affac978b1 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pl.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pl.xlf @@ -433,6 +433,11 @@ In this message, the term "binding" means a piece of generated code that makes i The following are literal names and should not be translated: .NET, Xamarin.Android. {0} - The file name such as 'Foo.dll.config' + + 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. + 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. + The following are literal names and should not be translated: 'Hybrid', 'AndroidAotMode', armeabi-v7a, 'AndroidSupportedAbis' + 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. Wykryto użycie metody AppDomain.CreateDomain() w następującym zestawie: {0}. Program .NET 5 obsługuje tylko jeden obiekt AppDomain, dlatego ten interfejs API nie będzie już dostępny w interfejsie Xamarin.Android po wydaniu programu .NET 5. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pt-BR.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pt-BR.xlf index d4397a69ce1..7f7e09a323a 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pt-BR.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pt-BR.xlf @@ -433,6 +433,11 @@ In this message, the term "binding" means a piece of generated code that makes i The following are literal names and should not be translated: .NET, Xamarin.Android. {0} - The file name such as 'Foo.dll.config' + + 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. + 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. + The following are literal names and should not be translated: 'Hybrid', 'AndroidAotMode', armeabi-v7a, 'AndroidSupportedAbis' + 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. O uso de AppDomain.CreateDomain() foi detectado no assembly: {0}. O .NET 5 dá suporte apenas a um único AppDomain, portanto, essa API não estará mais disponível no Xamarin.Android quando o .NET 5 for lançado. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ru.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ru.xlf index be1f411b567..353f846e7f0 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ru.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ru.xlf @@ -433,6 +433,11 @@ In this message, the term "binding" means a piece of generated code that makes i The following are literal names and should not be translated: .NET, Xamarin.Android. {0} - The file name such as 'Foo.dll.config' + + 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. + 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. + The following are literal names and should not be translated: 'Hybrid', 'AndroidAotMode', armeabi-v7a, 'AndroidSupportedAbis' + 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. В сборке обнаружено использование AppDomain.CreateDomain(): {0}. .NET 5 поддерживает только один домен AppDomain, поэтому этот API не будет доступен в Xamarin.Android после выпуска .NET 5. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.tr.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.tr.xlf index 96c744d58d9..bf296982d65 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.tr.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.tr.xlf @@ -433,6 +433,11 @@ In this message, the term "binding" means a piece of generated code that makes i The following are literal names and should not be translated: .NET, Xamarin.Android. {0} - The file name such as 'Foo.dll.config' + + 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. + 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. + The following are literal names and should not be translated: 'Hybrid', 'AndroidAotMode', armeabi-v7a, 'AndroidSupportedAbis' + 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. Bütünleştirilmiş kodda AppDomain.CreateDomain() metodunun kullanıldığı saptandı: {0}. .NET 5 yalnızca tek bir AppDomain'i destekleyeceğinden bu API, .NET 5 yayımlandıktan sonra artık Xamarin.Android içinde kullanılamayacak. diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hans.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hans.xlf index 84b98eef997..6c5f1fba528 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hans.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hans.xlf @@ -433,6 +433,11 @@ In this message, the term "binding" means a piece of generated code that makes i The following are literal names and should not be translated: .NET, Xamarin.Android. {0} - The file name such as 'Foo.dll.config' + + 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. + 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. + The following are literal names and should not be translated: 'Hybrid', 'AndroidAotMode', armeabi-v7a, 'AndroidSupportedAbis' + 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. 在程序集 {0} 中检测到使用了 AppDomain.CreateDomain()。.NET 5 将仅支持一个 AppDomain,因此 .NET 5 发布后,将无法再在 Xamarin.Android 中使用此 API。 diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hant.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hant.xlf index 67e13ab1b6b..b20dc32b30c 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hant.xlf +++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hant.xlf @@ -433,6 +433,11 @@ In this message, the term "binding" means a piece of generated code that makes i The following are literal names and should not be translated: .NET, Xamarin.Android. {0} - The file name such as 'Foo.dll.config' + + 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. + 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. + The following are literal names and should not be translated: 'Hybrid', 'AndroidAotMode', armeabi-v7a, 'AndroidSupportedAbis' + 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. 在下列組件中偵測到使用 AppDomain.CreateDomain(): {0}。.NET 5 只支援單一 AppDomain,因此在 .NET 5 發行之後,此 API 就無法再於 Xamarin.Android 中使用。 diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AotTests.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AotTests.cs index 2350b16fb2c..8e2ae279245 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AotTests.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AotTests.cs @@ -322,7 +322,7 @@ public static void Foo () { } [Test] - public void HybridAOT () + public void HybridAOT ([Values ("armeabi-v7a;arm64-v8a", "armeabi-v7a", "arm64-v8a")] string abis) { var proj = new XamarinAndroidApplicationProject () { IsRelease = true, @@ -331,8 +331,26 @@ public void HybridAOT () proj.SetProperty ("AndroidAotMode", "Hybrid"); // So we can use Mono.Cecil to open assemblies directly proj.SetProperty ("AndroidEnableAssemblyCompression", "False"); + proj.SetAndroidSupportedAbis (abis); using (var b = CreateApkBuilder ()) { + + if (abis == "armeabi-v7a") { + proj.SetProperty ("_AndroidAotModeValidateAbi", "False"); + b.Build (proj); + proj.SetProperty ("_AndroidAotModeValidateAbi", () => null); + } + + if (abis.Contains ("armeabi-v7a")) { + b.ThrowOnBuildFailure = false; + Assert.IsFalse (b.Build (proj), "Build should have failed."); + string error = b.LastBuildOutput + .SkipWhile (x => !x.StartsWith ("Build FAILED.")) + .FirstOrDefault (x => x.Contains ("error XA1025:")); + Assert.IsNotNull (error, "Build should have failed with XA1025."); + return; + } + b.Build (proj); var apk = Path.Combine (Root, b.ProjectDirectory, proj.OutputPath, $"{proj.PackageName}.apk"); diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/IncrementalBuildTest.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/IncrementalBuildTest.cs index 307c19f6fda..8f6f42f4a2b 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/IncrementalBuildTest.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/IncrementalBuildTest.cs @@ -1024,13 +1024,13 @@ void AssertAssemblyFilesInFileWrites (XamarinAndroidApplicationProject proj, Pro /* supportedAbis */ "arm64-v8a", /* androidAotMode */ "Full", // None, Normal, Hybrid, Full /* aotAssemblies */ true, - /* expectedResult */ false, + /* expectedResult */ true, }, new object[] { /* supportedAbis */ "arm64-v8a", /* androidAotMode */ "Full", // None, Normal, Hybrid, Full /* aotAssemblies */ false, - /* expectedResult */ false, + /* expectedResult */ true, }, new object[] { /* supportedAbis */ "arm64-v8a", @@ -1062,6 +1062,7 @@ public void BuildIncrementalAot (string supportedAbis, string androidAotMode, bo BundleAssemblies = false, AotAssemblies = aotAssemblies, }; + proj.SetAndroidSupportedAbis (supportedAbis); if (!string.IsNullOrEmpty (androidAotMode)) proj.SetProperty ("AndroidAotMode", androidAotMode); using (var b = CreateApkBuilder (path)) { diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets index e5b6637f914..5e162980d77 100644 --- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets +++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets @@ -2147,6 +2147,9 @@ because xbuild doesn't support framework reference assemblies. Condition=" '%(_BuildTargetAbis.Identity)' == 'armeabi' " Text="Invalid value 'armeabi' in %24(AndroidSupportedAbis). This ABI is no longer supported. Please update your project properties to remove the old value. If the properties page does not show an 'armeabi' checkbox, un-check and re-check one of the other ABIs and save the changes." /> +