1

After update that SDK on my Jenkin server. I am getting below console error.

FAILURE: Build failed with an exception.

MJM
  • 5,119
  • 5
  • 27
  • 53
Hafiz Waleed Hussain
  • 1,062
  • 12
  • 25

4 Answers4

5

Problem is because bintray is down: http://status.bintray.com

Try this: https://stackoverflow.com/a/49510333/1607169

webzooh
  • 356
  • 2
  • 9
0

It's not so good idea, but you can revert com.android.tools.build:gradle:3.1.0 to 3.0.1 And gradle-4.1-all.zip in distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip in gradle-wrapper.properties

0

Update your Project build gradle file with maven repo and proper jcenter like below and check:

  repositories {
      google()
      jcenter()
      jcenter { url "http://jcenter.bintray.com/" }
      maven { url 'https://maven.fabric.io/public' }
      maven { url "https://maven.google.com" }
      maven { url "http://repo1.maven.org/maven2" }
  }
whereswalden
  • 4,819
  • 3
  • 27
  • 41
0xAliHn
  • 18,390
  • 23
  • 91
  • 111
0

I was running into a similar error and upgraded gradle to version 4.4 and that resolved the gradle sync issues.

You can follow this guide to upgrade, or go to File > Project Structure > Project and enter in 4.4 for the Gradle version

My projet gradle files looks like this:

buildscript {
    ext.kotlin_version = '1.2.31'
    ext.anko_version='0.10.4'
    ext.supportLibVersion = '27.0.2'

    repositories {
        google()
        maven { url 'http://repo1.maven.org/maven2' }
        maven { url 'https://jitpack.io' }
        maven {
            url "https://maven.google.com"
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.google.gms:google-services:3.1.1'
    }
}

allprojects {
    repositories {
        google()
        maven { url 'http://repo1.maven.org/maven2' }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
james
  • 5,006
  • 8
  • 39
  • 64