Lottie-android: Error: Program type already present: android.support.v4.os.ResultReceiver

Created on 19 Jun 2018  路  4Comments  路  Source: airbnb/lottie-android

Error: Program type already present: android.support.v4.os.ResultReceiver
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.0-alpha3'
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha3'
implementation 'com.airbnb.android:lottie:2.5.5'

Most helpful comment

gradle.properties:

android.useAndroidX=true
android.enableJetifier=true

All 4 comments

gradle.properties:

android.useAndroidX=true
android.enableJetifier=true

@goldyonwar You can try compile ('com.airbnb.android:lottie:2.5.1'){ exclude group: 'com.android.support' }

Check the package which clashes with the com.android.support and exclude it from that package. For me, I was using androidx packages and also FCM, where there was a clash. So, this fixed for me:
implementation ('com.google.firebase:firebase-core:16.0.4') {
exclude group: 'com.android.support'
}

Was this page helpful?
0 / 5 - 0 ratings