I've added Lottie to an empty rn project and get following error:
`Could not resolve all dependencies for configuration ':app:_debugApk'.
A problem occurred configuring project ':lottie-react-native'.
Could not resolve all dependencies for configuration ':lottie-react-native:_debugPublishCopy'.
Could not find com.android.support:appcompat-v7:27.1.1.
Searched in the following locations:
file:/Users/akbari/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.1.1/appcompat-v7-27.1.1.pom
file:/Users/akbari/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/27.1.1/appcompat-v7-27.1.1.jar
file:/Users/akbari/bb/android/sdk-manager/com/android/support/appcompat-v7/27.1.1/appcompat-v7-27.1.1.jar
Required by:
bb:lottie-react-native:unspecified > com.airbnb.android:lottie:2.5.5`
Guys can anyone tell me why you are updating gradle items versions?
React Native by default is using build tools 23.0.1 and so on but you updated your own to 26 and 27!
it's a painful process to update gradle versions...
I'm using the latest version of react native (0.55.4)
+1 also having the same problem. Is this forcing us to use gradle 27?
i'm using lottie-react-native v2.5.0
I had the same issue, I downgraded to lottie-react-nativev2.3.2 the build worked afterwards
I had the same issue. According to this issue Could not find com.android.support:appcompat-v7:26.1.0.
In the android gradle file you need to specify the following
compileSdkVersion 26
buildToolsVersion "26.0.1"
and then find this text compile "com.android.support:appcompat-v7"
and make sure it says compile "com.android.support:appcompat-v7:26.0.1"
In your build.gradle file add maven url 'https://maven.google' should look like this
allprojects {
repositories {
mavenLocal()
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"
}
}
}
Rebuild your project, then this problem has been solved 馃槃
Most helpful comment
I had the same issue. According to this issue Could not find com.android.support:appcompat-v7:26.1.0.
In the android gradle file you need to specify the following
and then find this text
compile "com.android.support:appcompat-v7"and make sure it says
compile "com.android.support:appcompat-v7:26.0.1"In your build.gradle file add maven url 'https://maven.google' should look like this
Rebuild your project, then this problem has been solved 馃槃