6

So I saw a new update for Android Studio and I updated.

Although I keep getting errors that are more related to server problems than anything else. But this doesn't relate to my app.

One my apps has this error Could not HEAD 'https://jcenter.bintray.com/com/sun/xml/bind/mvn/jaxb-parent/2.2.11/jaxb-parent-2.2.11.pom'. Received status code 504 from server: Gateway Time-out Enable Gradle 'offline mode' and sync project

I tried the offline part but it didn't work.

And another one has this problem

    Could not HEAD 'https://jcenter.bintray.com/com/squareup/javawriter/2.5.0/javawriter-2.5.0.jar'. Received status code 504 from server: Gateway Time-out
Enable Gradle 'offline mode' and sync project

I would appreciate any help as I am kind of last thanks

//////////

EDIT Apparently it was a problem on the gradle, although here it is

    apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 26
    buildToolsVersion '27.0.3'
    defaultConfig {
        multiDexEnabled true
        applicationId "com.reecreate.woderator2"
        minSdkVersion 19
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      //  resConfigs "auto"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation 'com.android.support:multidex:1.0.1'
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.google.firebase:firebase-auth:11.8.0'
    implementation 'com.android.support:design:26.1.0'
    implementation 'com.google.firebase:firebase-core:11.8.0'
    implementation 'com.google.firebase:firebase-firestore:11.8.0'
    implementation 'com.android.support:recyclerview-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.google.android.gms:play-services-auth:11.8.0'
    implementation 'com.firebaseui:firebase-ui-auth:3.1.0'
    implementation 'com.facebook.android:facebook-login:4.27.0'
    implementation 'com.facebook.android:facebook-android-sdk:4.27.0'
    implementation 'com.google.android.gms:play-services-auth:11.8.0'
    implementation 'com.github.charbgr:authmanager:1.0'
    implementation 'com.github.warkiz.widget:indicatorseekbar:1.2.9'


    testImplementation 'junit:junit:4.12'
    androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}

apply plugin: 'com.google.gms.google-services'

Although now I have this error when I run my app (or try to) "09:54 Error running 'app': Unknown error"

Ka8srn
  • 69
  • 3

4 Answers4

2

I have the same issue after updating to 3.1. But it seems a temporary problem as I try to go to the 502 URL with my browser and I can load it. After trying to sync again my project, the 502 URL is a new one. Maybe too many people are updating, causing load problems.

EDIT: three hours later, it is all fine for me. Without rolling back anything. Temporary problem confirmed :)

  • This is the likely reason. That's why it works with the older gradle plugin (all the dependencies are in the cache) and starts working if you succeed once. – diidu Mar 27 '18 at 10:17
  • As I was guessing. Everything works fine again, without touching anything. – Stanislas Dourdin Mar 27 '18 at 11:58
0

I've got the same problem, build fails to download random (every time different) dependency. Downgraded gradle plugin to 3.0.1 and it's working, seems like a bug on their side.

Loki
  • 77
  • 1
  • 5
0

Problem seems to be in new gradle tools 3.1.0 that you can apply when updating.

Roll it back to classpath 'com.android.tools.build:gradle:3.0.1' in your build.gradle

AAverin
  • 3,014
  • 3
  • 27
  • 32
0

I also faced same problem, it is a temporary problem, no need to worry about it. You need to do one thing: just rebuild or clear or invalid caches continuously. That's it.

Eric Aya
  • 69,473
  • 35
  • 181
  • 253