Closed zollole closed 3 years ago
More info on this from a previous issue: https://stackoverflow.com/questions/24728894/get-exceptionininitializererror-when-adding-json-schema-validator-to-android-tes
Turns out I also excluded the schema v3 and v4 files in the build.gradle not knowing it would exclude both of the instances.
Solution: use 'pickFirst' instead of 'exclude'.
packagingOptions {
exclude 'META-INF/ASL-2.0.txt'
exclude 'META-INF/LGPL-3.0.txt'
//...
pickFirst 'draftv3/schema'
pickFirst 'draftv4/schema'
}
The app uses a Kotlin library with the schema validator (2.2.14) as a dependency. During the initialization of the validator the draftv4/schema resource cannot be found. This call in line 65 of SchemaVersion.java returns 'null':
SchemaVersion.class.getResource(resource)