适用于 Android 的 .NET 错误 XA4260

示例消息

error XA4260: Type 'Example.MyActivity' has a constructor parameter type 'System.Int32&' that cannot be represented in a Java constructor. Remove the constructor or change the parameter to a supported Java type.

Issue

Java 可调用包装器无法在构造函数签名中表示泛型参数或泛型实例化、按引用传递的类型、指针、函数指针或矩形数组。

解决方案

删除Java可见的构造函数或使用基元、字符串、绑定Java对象或单维数组参数。