Hi All , I am facing a issue with gradle build. g...
# community-support
s
Hi All , I am facing a issue with gradle build. gradle version 7.6.3-all getting below error allowInsecureProtocol true also added but still same error * What went wrong: Execution failed for task 'react native azurenotificationhubcompileDebugLibraryResources'.
A failure occurred while executing com.android.build.gradle.tasks.CompileLibraryResourcesTask$CompileLibraryResourcesAction
Could not isolate value com.android.build.gradle.tasks.CompileLibraryResourcesTask$CompileLibraryResourcesParams_Decorated@5c2ca06 of type CompileLibraryResourcesTask.CompileLibraryResourcesParams
Could not resolve all dependencies for configuration 'react native azurenotificationhubdetachedConfiguration2'.
Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'maven4(http://dl.bintray.com/microsoftazuremobile/SDK)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See https://docs.gradle.org/7.6.3/dsl/org.gradle.api.artifacts.repositories.UrlArtifactRepository.html#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol for more details.
* Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
android/build.gradle // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext { //buildToolsVersion = '33.0.0' minSdkVersion = 26 compileSdkVersion = 33 targetSdkVersion = 33 androidXCore = "1.0.2" kotlin_version = "1.8.22" } repositories { google() mavenCentral() mavenLocal() //jcenter() //mavenCentral{ // content { // excludeGroup("com.facebook.react") //} //} } dependencies { classpath('com.android.tools.buildG7.4.2') classpath("com.google.gmsgoogle services4.4.0") classpath("org.jetbrains.kotlinkotlin gradle plugin$kotlin_version") //implementation("org.jetbrains.kotlin.jsorg.jetbrains.kotlin.js.gradle.plugin$kotlin_version") //implementation("org.jetbrains.kotlinkotlin stdlib jdk7$kotlin_version") // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { google() mavenCentral() maven { url 'https://dl.bintray.com/microsoftazuremobile/SDK' allowInsecureProtocol true } 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") } //jcenter() maven { url 'https://www.jitpack.io' } } } subprojects { subproject -> if(project['name'] == 'react-native-reanimated'){ project.configurations { compile { } } } }
t
Bintray has been discontinued 3 years ago: https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/ Have you tried removing the repository declaration altogether? (hoping the dependencies have been moved to the Central repository)
s
Yes, tried remove it still got the same error
t
If you have the same error, then either you have a plugin that adds the repository, or you have the repository declared in another build file.
v
The problem is not really the repository in the own build script. Those react native dependencies come as own builds that are included. And that unmaintained project has that repository with http in its build script. There is a fork that uses Maven Central, you probably should use that instead.