I'm trying to build my project in a new Jenkins job where I am updating the dependencies to Android API-27. Nevertheless, I'm always getting the folowing error:
:smartconnectapilibrary:compileDebugAidl Putting task artifact state for task ':smartconnectapilibrary:compileDebugAidl' into context took 0.0 secs. Creating new cache for metadata-2.23/artifact-at-url, path /Users/jenkins/.gradle/caches/modules-2/metadata-2.23/artifact-at-url.bin, access org.gradle.cache.internal.DefaultCacheAccess@100205c4 Resource missing. [HTTP HEAD: https://jcenter.bintray.com/com/android/support/support-v4/27.1.1/support-v4-27.1.1.pom] Resource missing. [HTTP HEAD: https://jcenter.bintray.com/com/android/support/support-v4/27.1.1/support-v4-27.1.1.jar] :smartconnectapilibrary:compileDebugAidl FAILED :smartconnectapilibrary:compileDebugAidl (Thread[Task worker for ':' Thread 4,5,main]) completed. Took 0.612 secs.
FAILURE: Build failed with an exception.
I have updated both entries to compileSdkVersion 27
and buildToolsVersion '27.0.3'
everywhere, and added google()
in the repositories
section.
I have also read, that maybe Jenkins ignores the google()
repository, so it never finds the dependency com.android.support:support-v4:27.1.1
Also, this is a composite project (one main module, and two library modules) each with their own gradle files. In each of them, I already have google()
before jcenter()
but still I have this issue and I think it may be in the way of how Gradle stacks the gradle files.
Does somebody know a solution?
UPDATE
I see that for some reason, Gradle is looking forcom.android.support:support-v4:27.1.1
in /jenkins/Library/Android/sdk/extras/
instead of /jenkins/.gradle/caches/modules-2/files-2.1/
- What went wrong: Could not resolve all files for configuration ':fisherpriceapilibrary:debugCompileClasspath'. Could not find com.android.support:support-v4:27.1.1. Searched in the following locations: file:/Users/jenkins/Library/Android/sdk/extras/m2repository/com/android/support/support-v4/27.1.1/support-v4-27.1.1.pom file:/Users/jenkins/Library/Android/sdk/extras/m2repository/com/android/support/support-v4/27.1.1/support-v4-27.1.1.jar file:/Users/jenkins/Library/Android/sdk/extras/google/m2repository/com/android/support/support-v4/27.1.1/support-v4-27.1.1.pom file:/Users/jenkins/Library/Android/sdk/extras/google/m2repository/com/android/support/support-v4/27.1.1/support-v4-27.1.1.jar file:/Users/jenkins/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/27.1.1/support-v4-27.1.1.pom file:/Users/jenkins/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/27.1.1/support-v4-27.1.1.jar
https://jcenter.bintray.com/com/android/support/support-v4/27.1.1/support-v4-27.1.1.pom https://jcenter.bintray.com/com/android/support/support-v4/27.1.1/support-v4-27.1.1.jar Required by: project :smartconnectapilibrary > project :someapilibrary
build.gradle
file? – Faysal Ahmedmaven { url "https://maven.google.com" }
on all project repositories. – Faysal Ahmedgoogle()
which is the same thanmaven { url "https://maven.google.com" }
... actually I have tried both. This is not only onebuild.gradle
file, they are multiple ones, because this is a composite project. – Jorge Gil