React-Native/metadata.xml giving me a 403 forbidden - android

I have been running this react-native project on my android device and it has been working without any problems till yesterday.
Today when I run react-native run-android I am getting this following error:
> Task :app:preDebugBuild FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not resolve com.facebook.react:react-native:0.20.+.
Required by:
project :app > project :react-native-charts-wrapper
> Failed to list versions for com.facebook.react:react-native.
> Unable to load Maven meta-data from http://repo.spring.io/libs-release/com/facebook/react/react-native/maven-metadata.xml.
> Could not HEAD 'http://repo.spring.io/libs-release/com/facebook/react/react-native/maven-metadata.xml'. Received status code 403 from server: Forbidden
> Could not resolve com.facebook.react:react-native:0.12.+.
Required by:
project :app > project :react-native-i18n
> Failed to list versions for com.facebook.react:react-native.
> Unable to load Maven meta-data from http://repo.spring.io/libs-release/com/facebook/react/react-native/maven-metadata.xml.
> Could not HEAD 'http://repo.spring.io/libs-release/com/facebook/react/react-native/maven-metadata.xml'. Received status code 403 from server: Forbidden
Since it is a 403 I tried using a different Internet Connection and even a VPN , but it still is giving me the same error. Even my colleague is getting the same error.
This is the dependency on my build.gradle file : implementation "com.facebook.react:react-native:+"
Are other people also facing this issue?
Wonder why this is happening and how can I solve this?Thanks!

Got it to work by changing http to https at:
maven {
url "https://repo.spring.io/libs-release/"
name 'Spring Libs'
}
Weird though since it had no issue till a day ago. Lol

Related

Task 'kotlinCompilerClasspath' not found in project ':debug'

Android project failed during a build.
Could not determine the dependencies of task ':debug:compileDevelopDebugKotlin'.
Could not resolve all files for configuration ':debug:kotlinCompilerClasspath'.
Could not download kotlin-script-runtime-1.5.10.jar (org.jetbrains.kotlin:kotlin-script-runtime:1.5.10)
> Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-script-runtime/1.5.10/kotlin-script-runtime-1.5.10.jar'.
> Could not HEAD 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-script-runtime/1.5.10/kotlin-script-runtime-1.5.10.jar'. Received status code 502 from server: Bad Gateway

React native android build fails with Execution failed for task ':app:lintVitalRelease'. Could not download groovy-all-2..4.15.jar

Android build using AWS CodeBuild fails with following error:
Execution failed for task ':app:lintVitalRelease'.
> Could not resolve all files for configuration ':app:lintClassPath'.
> Could not download groovy-all-2.4.15.jar (org.codehaus.groovy:groovy-all:2.4.15)
> Could not get resource 'https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.jar'.
> Could not GET 'https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.jar'.
> Connection reset
The build works fine on my local machine. The above mentioned error occurs only while trying to build the apk using AWS CodeBuild.
If this has something to do with jcenter shutdown, how to fix it?
Open your build.gradle file and add the code below under android:
android {
lintOptions {
checkReleaseBuilds false
}
For more details Here

Android studio 4.0 Could not resolve all artifacts for configuration ':classpath'.Received status code 403 from server: OK

I have installed Android studio in Mac when i try to create new project it is not building for Kotlin and Java both languages.
Bellow exception is for Java project.
Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'SampleJavaApp'.
at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:80)
at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:73)
at org.gradle.configuration.project.LifecycleProjectEvaluator.access$600(LifecycleProjectEvaluator.java:53)
at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject$1.run(LifecycleProjectEvaluator.java:109)
at org.gradle.internal.Factories$1.create(Factories.java:26)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:189)
at org.gradle.internal.work.StopShieldingWorkerLeaseService.withLocks(StopShieldingWorkerLeaseService.java:40)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withProjectLock(DefaultProjectStateRegistry.java:238)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withMutableState(DefaultProjectStateRegistry.java:232)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withMutableState(DefaultProjectStateRegistry.java:193)
at
Bellow exception Kotlin
* What went wrong:
A problem occurred configuring root project 'SampleApplication'.
Could not resolve all artifacts for configuration ':classpath'.
Could not download kotlin-gradle-plugin-1.4.0.jar (org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0)
> Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4.0/kotlin-gradle-plugin-1.4.0.jar'.
> Could not GET Received status code 403 from server: OK
Could not download tink-1.3.0-rc2.jar (com.google.crypto.tink:tink:1.3.0-rc2)
Received status code 403 from server: OK
Could not download protobuf-java-3.10.0.jar (com.google.protobuf:protobuf-java:3.10.0)
> Could not get resource 'https://jcenter.bintray.com/com/google/protobuf/protobuf-java/3.10.0/protobuf-java-3.10.0.jar'.
> Could not GET
from server: OK
Could not download kotlin-annotation-processing-gradle-1.4.0.jar (org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.4.0)
> Could not get resource
I have used proxy settings which are working fine i have downloaded one project it is working fine.I have try all available solutions in google and SO.

Could not GET api.bitbucket.org/1.0/repository. when building my react-native project for android

I got an old running project that when built shows dependency error.
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:_debugApk'.
A problem occurred configuring project ':react-native-mqtt-iot'.
Could not resolve all dependencies for configuration ':react-native-mqtt-iot:_debugPublishCopy'.
Could not resolve co.ibhubs.ibchat:ibchat:0.0.1.
Required by:
project :react-native-mqtt-iot
Could not resolve co.ibhubs.ibchat:ibchat:0.0.1.
Could not get resource 'https://api.bitbucket.org/1.0/repositories/mumsnbabies/maven_awsiot/raw/releases/co/ibhubs/ibchat/ibchat/0.0.1/ibchat-0.0.1.pom'.
Could not GET 'https://api.bitbucket.org/1.0/repositories/mumsnbabies/maven_awsiot/raw/releases/co/ibhubs/ibchat/ibchat/0.0.1/ibchat-0.0.1.pom'. Received status code 410 from server: Gone
Could not resolve co.ibhubs.ibchat:ibchat:0.0.1.
Could not get resource 'https://api.bitbucket.org/1.0/repositories/mumsnbabies/maven_ibchat/raw/releases/co/ibhubs/ibchat/ibchat/0.0.1/ibchat-0.0.1.pom'.
Could not GET 'https://api.bitbucket.org/1.0/repositories/mumsnbabies/maven_ibchat/raw/releases/co/ibhubs/ibchat/ibchat/0.0.1/ibchat-0.0.1.pom'. Received status code 410 from server: Gone
Is it because of change of api version from 1.0 to 2.0? If so how to fix it?
Okay so I got the solution to fix.
In my case i change the url from https://api.bitbucket.org/1.0/repositories/mumsnbabies/maven_awsiot/raw/releases/co/ibhubs/ibchat/ibchat/0.0.1/ibchat-0.0.1.pom
to
https://api.bitbucket.org/2.0/repositories/mumsnbabies/maven_awsiot/src/releases/co/ibhubs/ibchat/ibchat/0.0.1/ibchat-0.0.1.pom
And adding the following lines of code before the url:
authentication {
basic(BasicAuthentication)
}

use gradle sdkmanager with travis.ci

the SDK-manager seems to do the detection OK:
Build tools 19.1.0 missing. Downloading...
Support library repository outdated. Downloading update...
Google Play Services repository outdated. Downloading update...
but in the end the dependencies are still missing:
A problem occurred configuring root project 'PassAndroid'.
> Could not resolve all dependencies for configuration
':_withMapsNoAnalyticsForPlayDebugCompile'.
> Could not resolve com.android.support:support-v4:20.0.+.
Required by:
:PassAndroid:unspecified
> Failed to list versions for com.android.support:support-v4.
> Could not list versions using M2 pattern 'https://raw.github.com/ligi/ligis-mvn-repo/master/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]'.
> Could not GET 'https://raw.github.com/ligi/ligis-mvn-repo/master/com/android/support/support-v4/'. Received status code 400 from server: Bad Request
> Could not resolve com.android.support:appcompat-v7:20.0.+.
Required by:
:PassAndroid:unspecified
> Failed to list versions for com.android.support:appcompat-v7.
> Could not list versions using M2 pattern 'https://raw.github.com/ligi/ligis-mvn-repo/master/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]'.
> Could not GET 'https://raw.github.com/ligi/ligis-mvn-repo/master/com/android/support/appcompat-v7/'. Received status code 400 from server: Bad Request
> Could not find com.google.android.gms:play-services:5.0.77.
Required by:
:PassAndroid:unspecified
here the full output: https://travis-ci.org/ligi/PassAndroid

Categories

Resources