XA1046-Fehler in .NET für Android

Beispielnachrichten

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

Das target-method-instance-to-static Attribut eines <replace-method> Elements in der JNI-Neuzuordnungs-XML-Datei enthält einen Wert, der nicht als boolescher Wert analysiert werden kann. Für das Attribut ist ein gültiger boolescher Wert erforderlich, true z. B. oder false.

Lösung

Aktualisieren Sie das Attribut target-method-instance-to-static in Ihrer JNI-Remapping-XML-Datei so, dass ein gültiger boolescher Wert (true oder false) verwendet wird:

<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>