Using JRJC with Gradle causes build errors

TriNityGER
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 19, 2018

So I'm trying to use the JIRA REST Java Client Library for my Android Project.

However after adding both dependencies to my app build.gradle:

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'

// Jira
implementation 'com.atlassian.jira:jira-rest-java-client-core:4.0.0'
implementation 'com.atlassian.jira:jira-rest-java-client-api:4.0.0'
}

 

It spits out errors when I try to compile my app:

More than one file was found with OS independent path 'org/apache/commons/codec/language/bm/gen_approx_hungarian.txt'

So I tried to exclude this and every other file which resulted in the following exclusion list:

packagingOptions {
exclude 'org/apache/commons/codec/language/bm/*'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/jersey-module-version'
exclude 'org/apache/http/version.properties'
exclude 'org/apache/http/client/version.properties'
exclude 'org/apache/http/entity/mime/version.properties'
exclude 'org/apache/http/nio/client/version.properties'
exclude 'org/apache/http/nio/version.properties'
exclude 'mozilla/public-suffix-list.txt'
}

Now I get this error:

Program type already present: org.apache.http.entity.mime.HttpBrowserCompatibleMultipart
Message{kind=ERROR, text=Program type already present: org.apache.http.entity.mime.HttpBrowserCompatibleMultipart, sources=[Unknown source file], tool name=Optional.of(D8)}

 

Any ideas? This is giving me real headache... And google is super unhelpful...

 

0 answers

Suggest an answer

Log in or Sign up to answer