Błąd XA1046 platformy .NET dla systemu Android

Przykładowe komunikaty

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

Atrybut target-method-instance-to-static elementu <replace-method> w pliku XML przemapowywania JNI zawiera wartość, której nie można zinterpretować jako wartości logicznej. Atrybut wymaga prawidłowej wartości logicznej, takiej jak true lub false.

Rozwiązanie

Zaktualizuj atrybut target-method-instance-to-static w pliku XML ponownego mapowania JNI, aby używać prawidłowej wartości logicznej (true lub 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>