I am trying to build Android project through jenkins but it's failing. Same build was working few days back and I did not make any changes in libraries. Here is console logs for same :
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:minifySitWithR8'.
> Could not resolve all task dependencies for configuration ':app:sitCompileClasspath'.
> Could not resolve androidx.camera:camera-core:[1.1.0].
Required by:
project :app > androidx.camera:camera-lifecycle:1.1.0
project :app > androidx.camera:camera-view:1.1.0
> Failed to list versions for androidx.camera:camera-core.
> Unable to load Maven meta-data from https://jcenter.bintray.com/androidx/camera/camera-core/maven-metadata.xml.
> Could not get resource 'https://jcenter.bintray.com/androidx/camera/camera-core/maven-metadata.xml'.
> Could not GET 'https://jcenter.bintray.com/androidx/camera/camera-core/maven-metadata.xml'. Received status code 403 from server: Forbidden
* 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.
* Get more help at https://help.gradle.org
I check visiting https://jcenter.bintray.com/androidx/camera/camera-core/maven-metadata.xml in browser but I am getting following response :
{
"errors" : [ {
"status" : 404,
"message" : "Maven metadata not found for 'androidx/camera/camera-core/maven-metadata.xml'."
} ]
}
Here is my project level gradle file :
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.4'
classpath 'com.google.gms:google-services:4.3.4'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.4.1'
classpath 'com.google.firebase:perf-plugin:1.3.3' // Performance Monitoring plugin
}
}
allprojects {
repositories {
google()
jcenter()
}
}
App level gradle file :
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.a.b.c"
minSdkVersion 21
targetSdkVersion 29
versionCode 385
versionName "0.55.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
gradle.properties :
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-bin.zip
I can not move to to higher gradle version which will force to upgrade my all libraries and I can not set targeted version more than 29(it need big changes to move to 31)
Need suggestions here
Remove jcenter()
from both repositories
closures. androidx.camera:camera-core
is available from google()
, which you already have.