Reputation: 1721
I'm building a react native app and I'm using react-native-gallery-manager
library.
Without it it works fine, but with it I get the following error:
*What went wrong:
A problem occurred configuring project ':react-native-gallery-manager'.
Could not resolve all artifacts for configuration ':react-native-gallery-manager:classpath'.
Could not find com.android.tools.build:gradle:2.2.3. Searched in the following locations: https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.jar
Required by: project :react-native-gallery-manager
In my android/build.gradle I have the following inside buildscript:
repositories {
google()
jcenter()
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
Does it mean I have to downgrade my gradle version?
Upvotes: 1
Views: 1256
Reputation: 36
you have to change
./node_modules/react-native-gallery-manager/android/build.gradle
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
}
}
Upvotes: 0
Reputation: 1672
Until the library you're talking about will fix the issue, add this code to your build.gradle
subprojects {
if (project.name.contains('react-native-gallery-manager')) {
buildscript {
repositories {
jcenter()
maven { url "https://dl.bintray.com/android/android-tools/" }
}
}
}
}
And same thing with all the libraries that have the problem... Many repo are currently being updated to fix it.
Upvotes: 3