jangrewe / gitlab-ci-android

GitLab CI image for building Android apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could not find com.android.tools.build:gradle:3.0.0

mathieudebrito opened this issue · comments

Hi there!

I got this issue since I switched to Android 3.0, do you have any idea ? Are you also running it using this config ?

Thanks for all !

// project build.gradle
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.0'
    }
}
Running with gitlab-runner 10.1.0 (c1ecf97f)
  on docker-auto-scale (e11ae361)
Using Docker executor with image jangrewe/gitlab-ci-android ...
Using docker image sha256:482ad96cc495f9af4755ea7f40e2cdee8d041d63d4d3153fa3faed8e73358371 for predefined container...
Pulling docker image jangrewe/gitlab-ci-android ...
Using docker image jangrewe/gitlab-ci-android ID=sha256:a61c4b9005d895f4af9bb1291002ce7ac9791e70d83aefa229c897309e9a2b49 for build container...
Running on runner-e11ae361-project-3948168-concurrent-0 via runner-e11ae361-srm-1509682867-055f7e67...
Cloning repository...
Cloning into '/builds/my-project'...
Checking out 05186f7c as master...
Skipping Git submodules setup
$ export GRADLE_USER_HOME=$(pwd)/.gradle
$ chmod +x ./gradlew
$ ./gradlew assembleDebug
Downloading https://services.gradle.org/distributions/gradle-4.1-all.zip
Unzipping /builds/my-project/.gradle/wrapper/dists/gradle-4.1-all/bzyivzo6n839fup2jbap0tjew/gradle-4.1-all.zip to /builds/gmy-project/.gradle/wrapper/dists/gradle-4.1-all/bzyivzo6n839fup2jbap0tjew
Set executable permissions for: /builds/my-project/.gradle/wrapper/dists/gradle-4.1-all/bzyivzo6n839fup2jbap0tjew/gradle-4.1/bin/gradle
Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'my-project'.
> Could not resolve all files for configuration ':classpath'.
   > Could not find com.android.tools.build:gradle:3.0.0.
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom
         https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.jar
     Required by:
         project :

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 10s
ERROR: Job failed: exit code 1

A great question, solved by a great google() solution !
(I forgot to add google() in the repositories as suggested by the new developer docs)