Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Example messages
error XA1047: Required attribute 'from' missing from element 'replace-type'; /path/to/jni-remapping.xml line 3.
error XA1047: Required attribute 'source-type' missing from element 'replace-method'; /path/to/jni-remapping.xml line 7.
Issue
A required attribute is missing from an element in the JNI remapping XML file.
The <replace-type> and <replace-method> elements each have required
attributes that must be present.
Required attributes for <replace-type>:
from— the original Java type name (e.g.com/example/OldClass)to— the replacement Java type name (e.g.com/example/NewClass)
Required attributes for <replace-method>:
source-type— the Java type containing the original methodsource-method-name— the name of the original methodtarget-type— the Java type containing the replacement methodtarget-method-name— the name of the replacement methodtarget-method-instance-to-static— whether the replacement converts an instance method to a static method (trueorfalse)
Solution
Add the missing required attributes to the element in your JNI remapping XML file. For example:
<replacements>
<replace-type from="com/example/OldClass" to="com/example/NewClass" />
<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>