Android Studio 3.1.4 Read timed out And Android Studio 2.3.3 SSL peer shut down incorrectly

Android Studio 3.1.4 Read timed out  

以前没升级过系统(一直以来都是直接重装),前些天点击升级,windows 10 家庭版直接升级到企业版,系统升级后居然把C盘给格了,一脸懵逼。。。

重新装了jdk配了环境,启动原来的Studio又直接手动升级到了3.1.4,新建项目发现报错 “ Read timed out  ”,试了网上的各种方法都行不通,后面找到了解决方法,在build.gradle下的repositories 插入

mavenCentral()
maven { url 'https://maven.google.com' }

这样就OK了。

完整的build.gradle

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

buildscript {
    
    repositories {
        google()
        mavenCentral()
        maven { url 'https://maven.google.com' }
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.4'
        

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

allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url 'https://maven.google.com' }
        jcenter()
    }
}

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

 

Android Studio 2.3.3 Error:SSL peer shut down incorrectly

问题一样的,都是访问不到造成

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

buildscript {
    repositories {
        mavenCentral()
        maven { url 'https://maven.google.com' }
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'

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

allprojects {
    repositories {
        mavenCentral()
        maven { url 'https://maven.google.com' }
        jcenter()
    }
}

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


 

Android Studio 3.1.4  对应 gradle版本 gradle-4.4-all 对应NDK版本 ndk-bundle(Studio里直接下载的)

Android Studio 2.3.3  对应 gradle版本 gradle-3.3-all 对应NDK版本 android-ndk-r15c

 

以下给出jdk环境 (系统变量):

JAVA_HOME
C:\Program Files\Java\jdk1.8.0_131
CLASSPATH
.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar
Path
%JAVA_HOME%\bin
%JAVA_HOME%\jre\bin

相关资源

你可能感兴趣的:(Android开发笔记)