Vikram Bhatt
Vikram Bhatt

Reputation: 35

Program type already present : gradle build error

Getting a strange gradle build error after integrating certain libraries, before that app was running fine, but now showing the following error.

Program type already present: com.nostra13.universalimageloader.cache.disc.impl.ext.DiskLruCache$1
Message{kind=ERROR, text=Program type already present: com.nostra13.universalimageloader.cache.disc.impl.ext.DiskLruCache$1, sources=[Unknown source file], tool name=Optional.of(D8)}

this error start appearing when importing the following libraries --

compile("com.vdopia.ads.lw:coresdk:2.5.3.3")
    compile("com.vdopia.ads.lw:google-adapter:1.0.7")
    compile("com.vdopia.ads.lw:adcolony-adapter:1.0.5")
    compile("com.vdopia.ads.lw:applovin-adapter:1.0.5")
    compile("com.vdopia.ads.lw:baidu-adapter:1.0.5")
    compile("com.vdopia.ads.lw:chartboost-adapter:1.0.7")
    compile("com.vdopia.ads.lw:facebook-adapter:1.0.5")
    compile('com.devbrackets.android:exomedia:4.0.3') //{
    //If you use your own version of exoplayer, uncomment below
    // exclude group: 'com.google.android.exoplayer'
    // }
    /*
     * Note: If you use the Baidu adapter, then please include:
     */
    compile ("com.android.support:palette-v7:27.1.1")
    compile("com.vdopia.ads.lw:inmobi-adapter:1.0.5")
    compile("com.vdopia.ads.lw:ironsrc-adapter:1.0.5")
    compile("com.vdopia.ads.lw:loopme-adapter:1.0.5")
    compile("com.vdopia.ads.lw:mopub-adapter:1.0.5")
    compile("com.vdopia.ads.lw:tapjoy-adapter:1.0.5")
    compile("com.vdopia.ads.lw:unity-adapter:1.0.7")
    compile("com.vdopia.ads.lw:vungle-adapter:1.0.5")
    compile("com.vdopia.ads.lw:yahoo-adapter:1.0.5")
    compile("com.vdopia.ads.lw:youappi-adapter:1.0.1")
    compile("com.vdopia.ads.lw:ogury-adapter:1.0.1")

Upvotes: 3

Views: 1569

Answers (1)

Venantius
Venantius

Reputation: 2549

More than one of your dependencies has a class that shares the same path and name. Figure out exactly which of those dependencies it is, and use an exclude group to omit it, e.g.

compile("com.vdopia.ads.lw:coresdk:2.5.3.3") { exclude group: 'com.nostra13.universalimageloader' }

Upvotes: 3

Related Questions