Lottie-react-native: Failed build on Android

Created on 17 Jul 2018  路  5Comments  路  Source: lottie-react-native/lottie-react-native

I'm integrating Lottie in my app, I've already done on iOS and it's working very well. But on Android it's not working

I'm getting this error:

AILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithDexBuilderForDevDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process /Users/usuario/.gradle/caches/transforms-1/files-1.1/lottie-2.5.6.aar/701ccd4789423b6563831658768ba978/jars/classes.jar
I've followed all steps listed here: http://airbnb.io/lottie/react-native/react-native.html#getting-started and it's not working Here is how files are: ##### android/build.gradle
buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.google.gms:google-services:3.2.0'
        classpath 'com.android.tools.build:gradle:3.1.3'
    }
}

allprojects {
    repositories {
        mavenLocal()
        google()
        jcenter()
        maven {
            url 'https://maven.google.com'
        }
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        maven { url "https://jitpack.io" }    // used for MPAndroidChart
    }
}
  
##### settings.gradle
rootProject.name = '...'
include ':lottie-react-native'
project(':lottie-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/lottie-react-native/src/android')
...
include ':app'

build.gradle



android {
compileSdkVersion 26
...
}
dependencies {
implementation project(':lottie-react-native') // I've to updated compile to implementation because i'm using firebase
...
}

MainApplication



...
import com.airbnb.android.react.lottie.LottiePackage;
...
@Override
protected List getPackages() {
return Arrays.asList(
new MainReactPackage(),
new LottiePackage(),
...
);
}

.

Does anyone have any idea about what's wrong?

Thanks

android

Most helpful comment

This issue is back again in lottie-RN 2.5.11. Version 2.5.10 is working ok

All 5 comments

This issue is back again in lottie-RN 2.5.11. Version 2.5.10 is working ok

Yes it is experienced the same on 2.5.11, rolled back package.json to 2.5.10 and linked fine.

REF for searchers: Failed to process lottie-2.5.6.aar

Why is this issue closed ? the problem is indeed in 2.5.11 and wasn't in 2.5.10
Though the solution given in the link works to bypass it

Was this fixed? I'm having this issue right now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AWrightIV picture AWrightIV  路  3Comments

AlirezaAkbarix picture AlirezaAkbarix  路  3Comments

ranvirgorai picture ranvirgorai  路  3Comments

willedanielsson picture willedanielsson  路  5Comments

duringg picture duringg  路  5Comments