.NET voor Android-foutmelding XA1046

Voorbeeldberichten

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

Het target-method-instance-to-static-kenmerk van een <replace-method>-element in het JNI-remapping-XML-bestand bevat een waarde die niet als Booleaanse waarde kan worden geïnterpreteerd. Voor het kenmerk is een geldige Booleaanse waarde vereist, zoals true of false.

Solution

Werk het attribuut target-method-instance-to-static in uw JNI-remapping-XML-bestand bij zodat het een geldige Booleaanse waarde gebruikt (true of 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>