• Developers Bugs Reported
  • [REPORTED] Importing bunq jitpack into android causes duplicate classes

Hi,
When trying to use the java sdk in android studio by importing the gradle dependency (as described here https://jitpack.io/#bunq/sdk_java/1.14.18), an immense amount of duplicate class errors appear.

I tried solving this by excluding the duplicate module from the import with

implementation ('com.github.bunq:sdk_java:1.14.18'){
    exclude group: "com.sun.xml.bind", module: "jaxb-impl"
}

however, this makes some of the default operations from the sdk run into runtime errors (e.g. :

which I suspect is caused by the now missing imports. Is there a proper way to use the java sdk in android studio which circumvents this?
Thanks!

    @Bastiaan#199423 Sure will do! Does that mean that there is currently no way of importing the Java sdk into android studio (or am I running into a niche issue here?)
    Thanks either way for the super fast reponse _

      @Cian-Cyan-Falcon#199424 Good question, I’m gonna test it this evening.

      Didn’t have this errors with the previous versions of the Java SDK

        Bastiaan changed the title to [REPORTED] Importing bunq jitpack into android causes duplicate classes.

          I've added this excludes to the build.gradle to get it to work:

              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:

              compileOptions.with {
                  sourceCompatibility = JavaVersion.VERSION_1_8
                  targetCompatibility = JavaVersion.VERSION_1_8
              }
            Write a Reply...