Open Ciatzo opened 3 years ago
@Ciatzo @angelomelonas
I've had to add this excludes getting it to work in my Android app/widget:
configurations {
all {
exclude group: "javax.activation", module: "javax.activation-api"
exclude group: "jakarta.xml.bind", module: "jakarta.xml.bind-api"
exclude group: "com.sun.xml.bind", module: "jaxb-impl"
}
}
And this:
compileOptions.with {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
This wasn't neccecary with the previous versions of the SDK
@basst85
configurations { all { exclude group: "javax.activation", module: "javax.activation-api" exclude group: "jakarta.xml.bind", module: "jakarta.xml.bind-api" exclude group: "com.sun.xml.bind", module: "jaxb-impl" } }
Adding these ^^ excludes solves the duplicate class errors but introduces the following error when running basic functionality:
java.lang.Error: javax.xml.datatype.DatatypeConfigurationException: Provider org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl not found
at javax.xml.bind.DatatypeConverterImpl.<clinit>(DatatypeConverterImpl.java:907)
at javax.xml.bind.DatatypeConverter.initConverter(DatatypeConverter.java:155)
at javax.xml.bind.DatatypeConverter.printBase64Binary(DatatypeConverter.java:626)
at com.bunq.sdk.security.SecurityUtils.getPublicKeyFormattedString(SecurityUtils.java:265)
at com.bunq.sdk.context.ApiContext.initializeInstallation(ApiContext.java:243)
at com.bunq.sdk.context.ApiContext.initialize(ApiContext.java:231)
at com.bunq.sdk.context.ApiContext.create(ApiContext.java:147)
@Ciatzo
You can add this line as dependency to your build.gradle to fix that error:
implementation group: 'xerces', name: 'xercesImpl', version: '2.12.0'
@basst85 Ah that seems to resolve the issue. I tried it earlier but with the wrong version of xercesImpl I guess. Thanks a lot!
@Ciatzo That's great news.
But looks like the initial issue is still a bug... @angelomelonas @lexym
Steps to reproduce:
What should happen:
What happens:
Traceback
SDK version and environment
Extra info:
Excluding the offending module causes basic SDK functionality to cease because of missing classes