-
Notifications
You must be signed in to change notification settings - Fork 564
Open
Labels
Area: App+Library BuildIssues when building Library projects or Application projects.Issues when building Library projects or Application projects.
Milestone
Description
Android framework version
net10.0-android (Preview)
Affected platform version
VS 2026 18.1.1, .Net 10.0.1 (also 10.0.0)
Description
As soon as i set the "Register("ViewName") attribute to a View in .Net for Android, it breaks the build with an "InvalidOperationException" when i try to rebuild the project.
Steps to Reproduce
- File -> New Android Project
- Create a CustomView that inherits from Android.Views.View --> building the project is fine
- Add the Attribute "Register("CustomView") to the class. --> building the project fails
With .net 9 this worked fine.
Did you find any workaround?
No, i didn't find a workaround
Relevant log output
System.InvalidOperationException: Missing required attribute 'package'
at Java.Interop.Tools.JavaCallableWrappers.Extensions.XmlExtensions.GetRequiredAttribute(XElement xml, String name)
at Java.Interop.Tools.JavaCallableWrappers.Adapters.XmlImporter.ImportType(XElement xml)
at Java.Interop.Tools.JavaCallableWrappers.Adapters.XmlImporter.Import(XElement xml)
at Xamarin.Android.Tasks.JavaObjectsXmlFile.Import(String filename, JavaObjectsXmlFileReadType readType)
at Xamarin.Android.Tasks.GenerateJavaCallableWrappers.GenerateWrappers(List`1 assemblies)
at Xamarin.Android.Tasks.GenerateJavaCallableWrappers.RunTask()
at Microsoft.Android.Build.Tasks.AndroidTask.Execute()Metadata
Metadata
Assignees
Labels
Area: App+Library BuildIssues when building Library projects or Application projects.Issues when building Library projects or Application projects.