2

I have a project built in old version of Android Studio, and i am trying to rebuild in new version. But its throwing me this error. I don't why its coming...?

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

Any help will be appreciated.

android {
        compileSdkVersion 27
        buildToolsVersion '27.0.3'

        packagingOptions {
            exclude 'proguard-project.txt'
            exclude 'project.properties'
            exclude 'META-INF/LICENSE.txt'
            exclude 'META-INF/LICENSE'
            exclude 'META-INF/NOTICE.txt'
            exclude 'META-INF/NOTICE'
            exclude 'META-INF/DEPENDENCIES.txt'
            exclude 'META-INF/DEPENDENCIES'
        }

        defaultConfig {
            applicationId "com.bgsltd.filecommande"
            minSdkVersion 16
            targetSdkVersion 27
            versionCode 11
            versionName "1.11"
        }

        signingConfigs {
            release
            config
        }
        buildTypes {
            release {
                signingConfig signingConfigs.release
            }
        }
        lintOptions {
            abortOnError false
        }

        flavorDimensions "mode"
        productFlavors {
            fdroid {
                buildConfigField "boolean", "IS_VERSION_FDROID", "true"
                signingConfig signingConfigs.config
                dimension "mode"
            }
            play {
                buildConfigField "boolean", "IS_VERSION_FDROID", "false"
                signingConfig signingConfigs.config
                dimension "mode"
            }
        }

    }

    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
            exclude group: 'com.android.support', module: 'support-annotations'
        })
        testImplementation 'junit:junit:4.12'

        implementation project(':StickyHeadersRecyclerView')

        implementation 'com.readystatesoftware.systembartint:systembartint:1.0.3'
        implementation 'com.android.support:design:27.1.0'
        implementation 'com.github.junrar:junrar:0.7'
        implementation 'org.apache.commons:commons-compress:1.17'
        implementation 'com.android.support:appcompat-v7:27.1.0'
        implementation 'com.android.support:cardview-v7:27.1.0'
        // Google Play Services
        playImplementation 'com.google.android.gms:play-services-plus:11.6.0'
        implementation 'org.sufficientlysecure:donations:2.3'
        playImplementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
        implementation 'com.github.clans:fab:1.6.1'
        implementation('com.github.afollestad.material-dialogs:core:0.8.5.3@aar') {
            transitive = true
        }

        implementation 'com.google.firebase:firebase-ads:11.6.0'
        implementation 'com.google.android.gms:play-services-ads:11.6.0'
        implementation('com.crashlytics.sdk.android:crashlytics:2.8.0@aar') {
            transitive = true;
        }

        implementation 'com.android.support:multidex:1.0.3'
    }
Kruti Parekh
  • 1,271
  • 9
  • 21
Robin.S
  • 21
  • 2

1 Answers1

-2

One change in this .... add multiDexEnabled= true;

defaultConfig {

        applicationId "com.bgsltd.filecommande"
        minSdkVersion 16
        targetSdkVersion 27
        versionCode 11
        versionName "1.11"
        multiDexEnabled true
    }
Chirag Patel
  • 559
  • 6
  • 14