0

I want to make a small test in android and lottie, so I created a new project in android studio, added this line to the dependencies: compile 'com.airbnb.android:lottie:2.8.0' but I get this error:

Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
    is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
    Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:5:5-19:19 to override.

and this is my gradle code that was generated automaticlly by android studio:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.app.lottie.lottieapp"
        minSdkVersion 16
        targetSdkVersion 28
        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:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    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'

    compile 'com.airbnb.android:lottie:2.8.0'
}
TylerH
  • 20,799
  • 66
  • 75
  • 101
TheDragoner
  • 273
  • 2
  • 6
  • 17

1 Answers1

1

The thing that resolved my issue was changing the compile version of lottie to:

compile 'com.airbnb.android:lottie:2.1.0'
TylerH
  • 20,799
  • 66
  • 75
  • 101
TheDragoner
  • 273
  • 2
  • 6
  • 17