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

相关资源

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值