androidandroid-studiogradleandroid-gradle-pluginconnection-timeout

gradle sync failed, read timeout error in android studio 3.3.1 for sample hello world app in


connection timeout error in gradle sync, in android studio 3.3 for sample hello world app in. Earlier it was working with no proxy set in http setting in android studio settings. I have tried other solution from stack overflow. looks like gradle can't download from all urls. now reinstalling studio after completely uninstalling it. Update after reinstalling the problem persists. enter image description here

SOMETIME build clean from GUI does not do anything at all.

Project level Build.gradle file ** Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
    google()
    jcenter()
    mavenCentral()

}
dependencies {
    classpath 'com.android.tools.build:gradle:3.0.1'

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

allprojects {
repositories {
    google()
    jcenter()
    mavenCentral()

}
}

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

**

App level build.graldle file

apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
    applicationId "com.example.myapplication"
    minSdkVersion 15
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.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'
}

Update

After formatting my windows 10 and freshly installed development tools, it now throws Gradle Sync Failed: Read timeout error


Solution

  • Solution: that worked for me

    setting - language and framework - kotlin - update kotlin plugin version - restart computer - run android studio and now it works and it ran faster Update kotlin plugin version

    tried

    1. using local gradle repository

    2. changing no proxy in setting-http

    3. uninstalling, reinstalling, formatting my laptop after 2 days:

    i tried to see a kotlin in setting. then there was an update for kotlin,