From 25c5c311961a2b9a00e2356fd1d4f1a282989782 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 29 Jun 2026 02:34:27 +0000 Subject: [PATCH 1/2] Initial plan From 09175f49a7a3d12accba5b87beb55136078a6470 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 29 Jun 2026 02:59:02 +0000 Subject: [PATCH 2/2] Add XA4256 for multiple JavaArtifact error Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com> --- .../Properties/Resources.Designer.cs | 9 +++++++++ .../Properties/Resources.resx | 6 ++++++ .../Utilities/MavenExtensions.cs | 3 +-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs b/src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs index 42e59329019..0615b52bf12 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs @@ -1605,6 +1605,15 @@ public static string XA4255 { } } + /// + /// Looks up a localized string similar to Only one '{0}' is allowed for '{1}' item '{2}'.. + /// + public static string XA4256 { + get { + return ResourceManager.GetString("XA4256", resourceCulture); + } + } + /// /// Looks up a localized string similar to Native library '{0}' will not be bundled because it has an unsupported ABI. Move this file to a directory with a valid Android ABI name such as 'libs/armeabi-v7a/'.. /// diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx index f41614e9e2a..2ac6b39b8c6 100644 --- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx +++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx @@ -1165,6 +1165,12 @@ To use a custom JDK path for a command line build, set the 'JavaSdkDirectory' MS Generated trimmable type map Java source '{0}' was not found. The following are literal names and should not be translated: trimmable type map, Java. {0} - Full path to the generated Java source file + + + Only one '{0}' is allowed for '{1}' item '{2}'. + {0} - MSBuild XML element name +{1} - MSBuild XML element name +{2} - MSBuild ItemSpec value Command '{0}' failed.\n{1} diff --git a/src/Xamarin.Android.Build.Tasks/Utilities/MavenExtensions.cs b/src/Xamarin.Android.Build.Tasks/Utilities/MavenExtensions.cs index 4abd9237a1b..2fc7a978595 100644 --- a/src/Xamarin.Android.Build.Tasks/Utilities/MavenExtensions.cs +++ b/src/Xamarin.Android.Build.Tasks/Utilities/MavenExtensions.cs @@ -86,9 +86,8 @@ public static bool TryParseJavaArtifact (this ITaskItem task, string type, TaskL return false; } - // TODO: Need a new message saying that only one JavaArtifact is allowed if (artifacts.Count > 1) { - log.LogCodedError ("XA4243", Properties.Resources.XA4243, "JavaArtifact", type, task.ItemSpec); + log.LogCodedError ("XA4256", Properties.Resources.XA4256, "JavaArtifact", type, task.ItemSpec); artifact = null; return false; }