Reputation: 428
my react native projects working well , today when i build it will through an error the error statement is *FAILURE: Build failed with an exception.
Where: Build file '/Users/users/Documents/MyProject/Project_Name/node_modules/react-native-create-thumbnail/android/build.gradle' line: 114
What went wrong: A problem occurred configuring project ':react-native-create-thumbnail'.
Could not resolve all files for configuration ':react-native-create-thumbnail:implementation'. Could not resolve com.facebook.react:react-native:0.70.+. Required by: project :react-native-create-thumbnail > Failed to list versions for com.facebook.react:react-native. > Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml. > Could not HEAD 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway* and i searched and got for remove jcenter() from my build.gradle ..what to do not get any idea. my android/build.gradle is
buildscript {
ext {
ext.kotlin_version = '1.6.20'
ffmpegKitPackage = "audio"
ffmpegKitPackage = "full-gpl"
buildToolsVersion = "33.0.2"
minSdkVersion = 24
compileSdkVersion = 33
targetSdkVersion = 33
googlePlayServicesAuthVersion = "19.2.0"
if (System.properties['os.arch'] == "aarch64") {
// For M1 Users we need to use the NDK 24 which added support for aarch64
ndkVersion = "24.0.8215888"
} else {
// Otherwise we default to the side-by-side NDK version from AGP.
ndkVersion = "21.4.7075529"
}
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:7.4.2")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("de.undercouch:gradle-download-task:5.0.1")
classpath("com.google.gms:google-services:4.4.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
classpath("com.google.firebase:firebase-crashlytics-gradle:2.9.9")
}
}
allprojects {
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
mavenCentral {
// We don't want to fetch react-native from Maven Central as there are
// older versions over there.
content {
excludeGroup "com.facebook.react"
}
}
google()
jcenter()
maven { url 'https://www.jitpack.io' }
maven { url 'https://maven.google.com' }
}
}
please help what to do now??
Upvotes: 1
Views: 343
Reputation: 8557
Repository Bintray/JCenter was sunset on 1 May 2021.
https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/
Please remove jcenter()
from your repository list.
Probably you need a little refresh versions of tools you used.
Upvotes: 1