From 5cfb539364961ffc6b1c6fb2b9c0cf374de31b9c Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Wed, 9 Sep 2026 02:15:46 +0000
Subject: [PATCH] Localize missing Java wrapper XML error
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
Documentation/docs-mobile/TOC.yml | 2 ++
Documentation/docs-mobile/messages/index.md | 1 +
Documentation/docs-mobile/messages/xa4264.md | 24 +++++++++++++++++++
.../Properties/Resources.Designer.cs | 9 +++++++
.../Properties/Resources.resx | 5 ++++
.../Tasks/GenerateJavaCallableWrappers.cs | 2 +-
6 files changed, 42 insertions(+), 1 deletion(-)
create mode 100644 Documentation/docs-mobile/messages/xa4264.md
diff --git a/Documentation/docs-mobile/TOC.yml b/Documentation/docs-mobile/TOC.yml
index 8adb45b8312..3faf90e458e 100644
--- a/Documentation/docs-mobile/TOC.yml
+++ b/Documentation/docs-mobile/TOC.yml
@@ -342,6 +342,8 @@
href: messages/xa4262.md
- name: XA4263
href: messages/xa4263.md
+ - name: XA4264
+ href: messages/xa4264.md
- name: XA4301
href: messages/xa4301.md
- name: XA4302
diff --git a/Documentation/docs-mobile/messages/index.md b/Documentation/docs-mobile/messages/index.md
index 29b747ff8ec..88e7609ec63 100644
--- a/Documentation/docs-mobile/messages/index.md
+++ b/Documentation/docs-mobile/messages/index.md
@@ -234,6 +234,7 @@ Either change the value in the AndroidManifest.xml to match the $(SupportedOSPla
+ [XA4261](xa4261.md): Type '{type}' has Java constructor signature '{signature}', but its base type does not expose a compatible Java constructor.
+ [XA4262](xa4262.md): Type '{type}' has an invalid [Export] SuperArgumentsString value '{value}'.
+ [XA4263](xa4263.md): The exported member '{member}' has unsupported signature type '{type}'. Use a Java peer type, a supported managed-to-Java mapping, or [ExportParameter].
++ [XA4264](xa4264.md): Java callable wrapper XML file '{path}' was not found.
+ XA4300: Native library '{library}' will not be bundled because it has an unsupported ABI.
+ [XA4301](xa4301.md): Apk already contains the item `xxx`.
+ [XA4302](xa4302.md): Unhandled exception merging \`AndroidManifest.xml\`: {ex}
diff --git a/Documentation/docs-mobile/messages/xa4264.md b/Documentation/docs-mobile/messages/xa4264.md
new file mode 100644
index 00000000000..51727f8641d
--- /dev/null
+++ b/Documentation/docs-mobile/messages/xa4264.md
@@ -0,0 +1,24 @@
+---
+title: .NET for Android error XA4264
+description: XA4264 error code
+ms.date: 09/09/2026
+f1_keywords:
+ - "XA4264"
+---
+
+# .NET for Android error XA4264
+
+## Example message
+
+```text
+error XA4264: Java callable wrapper XML file 'obj/Debug/net11.0-android/android-arm64/java-wrappers.xml' was not found.
+```
+
+## Issue
+
+The build could not find an intermediate XML file needed to generate Java callable wrappers.
+
+## Solution
+
+Clean and rebuild the project. If the error continues, report the issue at
+[dotnet/android](https://github.com/dotnet/android/issues).
diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs b/src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs
index ee769081fea..c813ec95a02 100644
--- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs
+++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.Designer.cs
@@ -1714,6 +1714,15 @@ public static string XA4263 {
}
}
+ ///
+ /// Looks up a localized string similar to Java callable wrapper XML file '{0}' was not found..
+ ///
+ public static string XA4264 {
+ get {
+ return ResourceManager.GetString("XA4264", 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 81e4fa63a37..daf6297d574 100644
--- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx
+++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx
@@ -1289,6 +1289,11 @@ To use a custom JDK path for a command line build, set the 'JavaSdkDirectory' MS
The following are literal names and should not be translated: Java, [ExportParameter].
{0} - Fully-qualified managed member name
{1} - Managed parameter or return type
+
+
+ Java callable wrapper XML file '{0}' was not found.
+ The following are literal names and should not be translated: Java, XML.
+{0} - Full path to the Java callable wrapper XML file
Command '{0}' failed.\n{1}
diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/GenerateJavaCallableWrappers.cs b/src/Xamarin.Android.Build.Tasks/Tasks/GenerateJavaCallableWrappers.cs
index 0d47b346c49..7090c72b94f 100644
--- a/src/Xamarin.Android.Build.Tasks/Tasks/GenerateJavaCallableWrappers.cs
+++ b/src/Xamarin.Android.Build.Tasks/Tasks/GenerateJavaCallableWrappers.cs
@@ -65,7 +65,7 @@ void GenerateWrappers (List assemblies)
var wrappersPath = JavaObjectsXmlFile.GetJavaObjectsXmlFilePath (assembly);
if (!File.Exists (wrappersPath)) {
- Log.LogError ($"'{wrappersPath}' not found.");
+ Log.LogCodedError ("XA4264", Properties.Resources.XA4264, wrappersPath);
return;
}