Izas
Izas

Reputation: 19

Program type already present: org.apache.oltu.oauth2.common.OAuth$HttpMethod

I am trying to implement docusign in my Android App, but when i add the line of the implementation in my build.graddle , the gradle sync runs ok, but when i go to compile in the device i always see the same error:

Program type already present: org.apache.oltu.oauth2.common.OAuth$HttpMethod Message{kind=ERROR, text=Program type already present: org.apache.oltu.oauth2.common.OAuth$HttpMethod, sources=[Unknown source file], tool name=Optional.of(D8)} I am downloaded the docusign-android-starter-kit too and it have the same error. I had search a solution but nothing its valid i try add the depencie like this, but not working...

implementation ("com.docusign:docusign-esign-java:2.6.1"){ exclude group: 'org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.2' }

My build.gradle is this:

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    useLibrary 'org.apache.http.legacy'
    defaultConfig {
        applicationId "com.commonms.android_docusign"
        minSdkVersion 21
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

}

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.0'
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.android.support:support-v4:27.1.1'
    implementation 'com.itextpdf:itextg:5.5.10'
    implementation 'com.google.code.gson:gson:2.8.0'
   implementation ("com.docusign:docusign-esign-java:2.6.1"){
        exclude group: 'org.apache.oltu.oauth2:org.apache.oltu.oauth2.client'
    }

    implementation group: 'org.bitbucket.b_c', name: 'jose4j', version: '0.5.2'
    implementation group: 'org.apache.httpcomponents', name: 'httpclient-android', version: '4.3.5.1'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

    implementation project(':signaturesdk')
    implementation project(path: ':pdfViewer')

Could anyone help me? Very thanks!

Upvotes: 1

Views: 678

Answers (1)

drummor
drummor

Reputation: 51

configurations.all {exclude group: 'org.apache.oltu.oauth2', module: 'org.apache.oltu.oauth2.common'}

Upvotes: 1

Related Questions