ini4j only works from the libs directory, not maven

Multi tool use
ini4j only works from the libs directory, not maven
I'm trying to use ini4j in an Android app, compiled in the AIDE IDE. When I put ini4j-0.5.4.jar in the libs folder in my app, it works. However, when I include ini4j with the line compile 'org.ini4j:ini4j:0.5.4'
in my build.gradle, I get the error bad utf-8 byte a0 at offset 00000004
. I've checked the jar file in the Maven directory, and it is identical to the one in my libs folder. Both have the SHA1 4a3ee4146a90c619b20977d65951825f5675b560
. I have absolutely no clue what could be causing this.
compile 'org.ini4j:ini4j:0.5.4'
bad utf-8 byte a0 at offset 00000004
4a3ee4146a90c619b20977d65951825f5675b560
EDIT: For some reason, it seems to have xerces as a dependency, which is the library known to have these issues.
1 Answer
1
According to Apache (http://xerces.apache.org/xerces2-j/install.html) xerces.jar is now deprecated and renamed to xercesImpl.jar, so you have to stick to the old JAR.
xerces.jar is no longer available in the main distribution. You can still download this jar from deprecated distribution. xerces.jar is a Jar file that contains all the parser class files (i.e., it contains the intersection of the contents of xercesImpl.jar and xml-apis.jar).
To be clearer, the technical details are:
The old xerces.jar you have in your libs folder is working, because of the internal folder structure.
The new xerces from the repository has a different folder structure and some weird UTF encoded bytes AIDE is not understanding.
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review
– CJ Dennis
Jul 1 at 10:38
I'm not using Xerces, or at least not trying to. I mean ini4j doesn't work unless I include the ini4j jar, because somewhere along the dependency tree ini4j requires it (it doesn't show on the dependency tree on their site, so it's at least a dependency of a dependency of a dependency, but I'm not sure what for).
– PorygonZRocks
Jul 1 at 17:51
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
– Arijit Mukherjee
Jul 1 at 10:02