gradle 同步失败,android studio 3.3.1 中的示例 hello world 应用程序读取超时错误

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

gradle 同步中的连接超时错误,在 android studio 3.3 中用于示例 hello world 应用程序。 早些时候它在 android 工作室设置的 http 设置中没有设置代理。 我已经尝试过堆栈溢出的其他解决方案。看起来 gradle 无法从所有网址下载。 现在完全卸载后重新安装工作室。 更新 重装后问题依旧。

SOMETIME build clean 从 GUI 根本不做任何事情。

项目级别Build.gradle文件 ** 顶级构建文件,您可以在其中添加所有 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
}

**

应用级别build.graldle文件

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'
}

更新

在格式化我的 windows 10 和新安装的开发工具后,它现在抛出 Gradle 同步失败:读取超时错误

它的网络问题无法在 Gradle

中构建传递 offline 参数

尝试./gradlew tasks --offline

对于 运行 Android 项目 offline 模式访问 GRADLE CLI 文档:Gradle

Android工作室

在 Android 中,工作室可以 Gradleoffline 模式选项构建您的项目:

Settings -- Build, Execution, Deployment -- Build tools -- Gradle

解决方案:对我有用

设置 - 语言和框架 - 科特林- 更新 kotline 插件版本 - 重启电脑—— 运行 android studio and shhuk it works and it 运行 fater

尝试过 1) 使用本地 gradle 存储库

2) 在 setting-http

中更改无代理

3) 卸载、重新安装、格式化我的笔记本电脑 2 天后:

我试图在设置中看到一个 kotline。然后是 kotline 的更新,