7

I have just updated my Android studio from 3.0.1 to 3.1.0

I am getting this error when Global Gradle setting offline work is disabled

Could not GET 'https://jcenter.bintray.com/com/sun/xml/bind/mvn/jaxb-runtime-parent/2.2.11/jaxb-runtime-parent-2.2.11.pom'. Received status code 502 from server: Bad Gateway Enable Gradle 'offline mode' and sync project

I tried enabling the Global Gradle setting offline work then this error occurs

No cached version of org.glassfish.jaxb:jaxb-runtime:2.2.11 available for offline mode. Disable Gradle 'offline mode' and sync project

Vikas singh
  • 2,543
  • 1
  • 13
  • 27

3 Answers3

3

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

  repositories {
      google()
      jcenter()
      maven { url 'https://maven.fabric.io/public' }
      maven {
        url "https://maven.google.com"
      }
}

Also try with this changes if doesn't work

repositories {
    jcenter {
        url "http://jcenter.bintray.com/"
    }
}


repositories {
    maven  {
        url "http://repo1.maven.org/maven2"
    }
}
0xAliHn
  • 18,256
  • 21
  • 87
  • 110
3

The problem is on the jcenter side, see http://status.bintray.com

Intermittent download failures Identified - There is an intermittent download failures due to an issue with CDN provider. CDN provider is investigating the issue. Mar 17, 21:29 UTC

Jozka Jozin
  • 2,340
  • 1
  • 15
  • 12
1

After updating the Android Studio to 3.1.0

I just had the same problem, I resolved it using

maven {
        url "https://maven.google.com"
    }
to the TopMost buildScript like this in project-level gradle :-

 buildscript {
    repositories {
      .....
      ...
     maven {
        url "https://maven.google.com"
     }

For reference take a sample of the project-level gradle:-

buildscript {

  repositories {
      google()
      jcenter()
      maven { url 'https://maven.fabric.io/public' }
      maven {
        url "https://maven.google.com"
      }
}
 dependencies {
     classpath 'com.android.tools.build:gradle:3.1.0'
     classpath 'io.fabric.tools:gradle:1.24.4'

     // NOTE: Do not place your application dependencies here; they belong
     // in the individual module build.gradle files
   }
}

 allprojects {
   repositories {
      google()
      jcenter()      
   }
 }

task clean(type: Delete) {
    delete rootProject.buildDir
}

Also in gradle-wrapper.properties use this :-

distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

instead of 4.1-all.zip
Akshay Katariya
  • 1,446
  • 9
  • 20