Hello,
I'm trying to build my project (Android) after linking lottie-react-native,
Seems that my buildtools version doesnt satisfy version constraints.
I'm getting alot of these errors in console.
my buildscript ext is :
{
buildToolsVersion = "28.0.2"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 27
supportLibVersion = "28.0.0"
}
any workaround this please ?
Edit use @rgoldiez's fix instead
In node_modules/lottie-react-native/src/android/build.gradle you need to change the dependencies to:
dependencies {
compileOnly "com.facebook.react:react-native:+"
implementation "com.airbnb.android:lottie:2.5.6"
implementation "com.android.support:appcompat-v7:28.0.0" // <- add this line
}
I'm not sure why you need to do that, but that fixed it for me
This will also fix it... add to your android/build.gradle
allprojects {
repositories {
// ... your other stuff
configurations.all {
resolutionStrategy {
force "com.android.support:appcompat-v7:$supportLibVersion"
}
}
}
}
@rgoldiez yours is the best solution I've found so far, thanks!
configurations.all {
resolutionStrategy {
force "com.android.support:appcompat-v7:$supportLibVersion"
}
}
It worked but returned this warning:
uses unchecked or unsafe operations.
Recompile with -Xlint:unchecked for details.
Most helpful comment
This will also fix it... add to your
android/build.gradle