Lottie-android: Series of Issues with the version 2.8.0

Created on 11 Nov 2018  路  2Comments  路  Source: airbnb/lottie-android

Hi,

I'm just new to Lottie and it is going to exhaust me with no clear answer.

I'm using Android SDK version 28 with the minimum SDK version 23. First, I just add implementation 'com.airbnb.android:lottie:2.8.0' simply in my gradle. Syncing it arises no error. Then Android studio tells me this:

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 element at AndroidManifest.xml:6:5-21:19 to override.

Then I simply add two attributes: tools:replace="android:appComponentFactory" and android:appComponentFactory="whateverString" in my manifest application to solve it.

Now I will face a series of problems. First this message appears which tells me that "META-INF/androidx.legacy_legacy-support-core-utils.version" has already an installed version. Then I exclude it in my gradle: packagingOptions { exclude 'META-INF/androidx.legacy_legacy-support-core-utils.version' }.

Then this message appears:

D:...\Lottie_Tetst\app\build\intermediates\transforms\mergeJavaRes\debug\0.jar: The process cannot access the file because it is being used by another process.

I've migrated my code to androidx and the result was nothing. Also I've added compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 }
Then the result was nothing. I'm totally sticked with loop of errors and I've no idea how to confront them.

Help me please!

Bests
Alireza Alikhani

Most helpful comment

@Algit73 2.8.0 requires migrating to AndroidX. You must use 2.7.0 if you haven't upgraded.
CHANGELOG

All 2 comments

@Algit73 2.8.0 requires migrating to AndroidX. You must use 2.7.0 if you haven't upgraded.
CHANGELOG

@Algit73 2.8.0 requires migrating to AndroidX. You must use 2.7.0 if you haven't upgraded.
CHANGELOG

I agree. I'm getting this error in version 2.8.0.

  • What went wrong:
    Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
    > com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Was this page helpful?
0 / 5 - 0 ratings