facebook / fresco

An Android library for managing images and the memory they use.
https://frescolib.org/
MIT License
17.07k stars 3.75k forks source link

Error:Program type already present: bolts.BoltsExecutors$ImmediateExecutor #2051

Closed KirillJJ closed 6 years ago

KirillJJ commented 6 years ago

Description

I added Fresco to my project. And after this my build start failing with this error: Error:Program type already present: bolts.BoltsExecutors$ImmediateExecutor

Additional Information

compileSdkVersion 27
targetSdkVersion 27
minSdkVersion 19

ext { supportLibraryVersion = '27.0.2' dagger2Version = '2.11' moxyVersion = '1.5.3' rxBindingVersion = '2.0.0' playServicesVersion = '11.4.2' butterKnifeVersion = '8.8.1' autoValueVersion = '1.2' retrofitVersion = '2.3.0' androidSupportTestVersion = '1.0.1' asneVersion = '0.3.3' glideVersion = '4.6.1' } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' })

//make up and view
implementation "com.android.support:design:$supportLibraryVersion"
implementation "com.android.support:cardview-v7:$supportLibraryVersion"
implementation 'com.android.support.constraint:constraint-layout:1.1.0-beta5'
implementation "com.android.support:appcompat-v7:$supportLibraryVersion"
implementation "com.android.support:support-annotations:$supportLibraryVersion"
implementation "com.android.support:design:$supportLibraryVersion"
implementation 'com.github.captain-miao:optroundcardview:1.0.0'

//google play services
implementation "com.google.android.gms:play-services-maps:$playServicesVersion"
implementation "com.google.android.gms:play-services-location:$playServicesVersion"
implementation "com.google.firebase:firebase-messaging:$playServicesVersion"
implementation "com.google.firebase:firebase-core:$playServicesVersion"

//Dagger 2
implementation "com.google.dagger:dagger:$dagger2Version"
annotationProcessor "com.google.dagger:dagger-compiler:$dagger2Version"
implementation "com.google.dagger:dagger-android:$dagger2Version"
implementation "com.google.dagger:dagger-android-support:$dagger2Version"

// if you use the support libraries
annotationProcessor "com.google.dagger:dagger-android-processor:$dagger2Version"
compileOnly 'javax.annotation:jsr250-api:1.0'

compile 'de.hdodenhof:circleimageview:2.2.0'
//Rx

// Because RxAndroid releases are few and far between, it is recommended you also

// explicitly depend on RxJava's latest version for bug fixes and new features.
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'io.reactivex.rxjava2:rxjava:2.1.2'
implementation 'com.github.akarnokd:rxjava2-interop:0.10.2'
implementation 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.4@aar'
implementation 'com.akaita.java:rxjava2-debug:1.2.1'

implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.0'

// implementation 'com.facebook.fresco:fresco:1.3.0' // implementation 'me.relex:photodraweeview:1.1.3' //implementation 'com.github.CodyyAndroid:RxPermissions:2.0.3'

//implementation 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.4@aar'

//RxBindings
implementation "com.jakewharton.rxbinding2:rxbinding:$rxBindingVersion"
implementation "com.jakewharton.rxbinding2:rxbinding-appcompat-v7:$rxBindingVersion"
implementation "com.jakewharton.rxbinding2:rxbinding-design:$rxBindingVersion"

//ButterKnife
implementation "com.jakewharton:butterknife:$butterKnifeVersion"
annotationProcessor "com.jakewharton:butterknife-compiler:$butterKnifeVersion"

//Moxy MvpActivity and MvpFragment
implementation "com.arello-mobile:moxy:$moxyVersion"
annotationProcessor "com.arello-mobile:moxy-compiler:$moxyVersion"
implementation "com.arello-mobile:moxy-android:$moxyVersion"

//for MvpActivity and MvpFragment
implementation "com.arello-mobile:moxy-app-compat:$moxyVersion"

//AutoValue
compileOnly "com.google.auto.value:auto-value:$autoValueVersion"
annotationProcessor "com.google.auto.value:auto-value:$autoValueVersion"

//Authorization
implementation "com.github.asne:asne-vk:$asneVersion"
implementation "com.github.asne:asne-facebook:$asneVersion"
implementation "com.github.asne:asne-odnoklassniki:$asneVersion"

implementation 'com.google.code.gson:gson:2.8.1'
annotationProcessor 'dk.ilios:realmfieldnameshelper:1.1.1'
implementation 'com.seppius.plurals:android-i18n-plurals:1.1'
implementation 'com.annimon:stream:1.1.8'
implementation 'ru.terrakok.cicerone:cicerone:3.0.0'
implementation 'com.google.guava:guava:23.0-android'
implementation 'android.arch.lifecycle:runtime:1.1.0'
implementation 'android.arch.lifecycle:extensions:1.1.0'
implementation 'com.android.support:multidex:1.0.2'
implementation 'com.loopeer.lib:shadow:0.0.3'
implementation 'com.sdsmdg.harjot:vectormaster:1.1.1'

implementation 'com.facebook.fresco:fresco:1.8.1'

//work with internet
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
implementation 'com.squareup.okhttp3:okhttp:3.8.1'
implementation 'com.squareup.retrofit2:converter-gson:2.2.0'
implementation 'com.github.mirrajabi:okhttp-json-mock:1.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.8.1'

implementation 'com.github.bumptech.glide:glide:4.6.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
implementation 'com.zlc.glide:webpdecoder:0.0.5'

//test
testImplementation 'junit:junit:4.12'
implementation 'javax.annotation:javax.annotation-api:1.2'
implementation 'com.facebook.stetho:stetho:1.5.0'
implementation 'com.uphyca:stetho_realm:2.1.0'
implementation 'com.jakewharton.timber:timber:4.5.1'
implementation 'com.github.castorflex.smoothprogressbar:library:1.1.0'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.8.9'
androidTestImplementation "com.android.support.test:runner:$androidSupportTestVersion"
androidTestImplementation "com.android.support.test:rules:$androidSupportTestVersion"
androidTestImplementation 'org.mockito:mockito-core:1.9.5'

//только данная версия поддерживает тестирование под андроид
androidTestImplementation 'com.crittercism.dexmaker:dexmaker:1.4'
androidTestImplementation 'com.crittercism.dexmaker:dexmaker-dx:1.4'
androidTestImplementation 'com.crittercism.dexmaker:dexmaker-mockito:1.4'

}

oprisnik commented 6 years ago

Do you already use Bolts for something else in your Gradle file?

Please fill out the GitHub issue template.

KirillJJ commented 6 years ago

@oprisnik no, i don't use it

lambdapioneer commented 6 years ago

Hi @KirillJJ,

I've tried to use your dependency list to see which import is providing another bolt copy. However, I've run into multiple other errors (and I'm missing the values for your variables). Can you try to get a more verbose log that might point to which other import provides the bolts library? Or try to disable them one-by-one until that error goes away?

oprisnik commented 6 years ago

Closing due to inactivity. Happy to re-open once we have more details.