Edit

.NET for Android error XA1046

Example messages

error XA1046: Attribute 'target-method-instance-to-static' in element 'replace-method' has value 'yes' that cannot be parsed as boolean; /path/to/jni-remapping.xml line 5.

Issue

The target-method-instance-to-static attribute of a <replace-method> element in the JNI remapping XML file contains a value that cannot be parsed as a boolean. The attribute requires a valid boolean value such as true or false.

Solution

Update the target-method-instance-to-static attribute in your JNI remapping XML file to use a valid boolean value (true or false):

<replacements>
  <replace-method
    source-type="com/example/Source"
    source-method-name="instanceMethod"
    target-type="com/example/Target"
    target-method-name="staticMethod"
    target-method-instance-to-static="true" />
</replacements>