Android Studio 3.0.1 – Gradlew build failure

You may also like...

8 Responses

  1. moein says:

    hi , for me not working !!!!!!!!!!!!
    in end line :
    Connect to jcenter.bintray.com:443 [jcenter.bintray.com/108.168.243.150] failed: Connection timed out: connect

  2. moein says:

    can you help me ??
    i examine very ways, but none of them helped me

    • Dan says:

      Two possibilities come to mind: 1) it is possible that jcenter was down at the time you tried it, 2) there could be a routing issue between your network and jcenter.

      The first thing I’d recommend is to try it again. If it still fails, I would suspect that there’s a routing issue between your network and jcenter. If that’s the case it may be easier to just change “jcenter()” to “mavenCentral()”. Let me know if you need further assistance.

  3. moein says:

    hi
    I still have not been able to solve my problem, this is the last error that android Studio Version 3.1.2 of “stable channel” gives me:

    Failed to resolve: com.android.support:appcompat-v7:27.1.1
    Show in File
    Show in Project Structure dialog

    Failed to resolve: com.android.support.constraint:constraint-layout:1.1.0
    Show in File
    Show in Project Structure dialog

    Failed to resolve: com.android.support.test:runner:1.0.2
    Show in File
    Show in Project Structure dialog

    Failed to resolve: com.android.support.test.espresso:espresso-core:3.0.2
    Show in File
    Show in Project Structure dialog
    …………………………………………………………………………………………………………………………………………….
    this is my module app file :

    apply plugin: ‘com.android.application’

    android {
    compileSdkVersion 27
    defaultConfig {
    applicationId “com.example.moeiin.myapplication”
    minSdkVersion 15
    targetSdkVersion 27
    versionCode 1
    versionName “1.0”
    testInstrumentationRunner “android.support.test.runner.AndroidJUnitRunner”
    }
    buildTypes {
    release {
    minifyEnabled false
    proguardFiles getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.pro’
    }
    }
    }

    dependencies {
    implementation fileTree(dir: ‘libs’, include: [‘*.jar’])
    implementation ‘com.android.support:appcompat-v7:27.1.1’
    implementation ‘com.android.support.constraint:constraint-layout:1.1.0’
    testImplementation ‘junit:junit:4.12’
    androidTestImplementation ‘com.android.support.test:runner:1.0.2’
    androidTestImplementation ‘com.android.support.test.espresso:espresso-core:3.0.2’
    }
    ………………………………………………………………………………………………………………………………………………
    this is my build.gradle :

    buildscript {

    repositories {
    google()
    mavenLocal()
    mavenCentral()

    }
    dependencies {
    classpath ‘com.android.tools.build:gradle:3.1.2’

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

    allprojects {
    repositories {
    google()
    mavenLocal()
    mavenCentral()
    }
    }

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

    • Dan says:

      Can you try adding “jcenter()” to your “repositories” sections in the build.gradle file? e.g.

      respositories {
      google()
      jcenter()
      mavenLocal()
      mavenCentral()
      }

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.