官网下载Android Studio安装包后安装启动Android Studio,程序提示安装SDK,因为代理/翻墙的原因,安装component失败,错误如下:

Preparing "Install Android SDK Platform-Tools (revision: 28.0.0)".Downloading https://dl.google.com/android/repository/platform-tools_r28.0.0-windows.zip"Install Android SDK Platform-Tools (revision: 28.0.0)" ready.Installing Android SDK Platform-Tools in D:\Android\sdk\platform-tools"Install Android SDK Platform-Tools (revision: 28.0.0)" complete."Install Android SDK Platform-Tools (revision: 28.0.0)" finished.Preparing "Install Android Support Repository (revision: 47.0.0)".Downloading https://dl.google.com/android/repository/android_m2repository_r47.zipjava.io.IOException: Cannot download 'https://dl.google.com/android/repository/android_m2repository_r47.zip': SSL peer shut down incorrectly, response: 200 OKWarning: An error occurred while preparing SDK package Android Support Repository: Cannot download 'https://dl.google.com/android/repository/android_m2repository_r47.zip': SSL peer shut down incorrectly, response: 200 OK."Install Android Support Repository (revision: 47.0.0)" failed.Preparing "Install Android SDK Tools (revision: 26.1.1)".Downloading https://dl.google.com/android/repository/sdk-tools-windows-4333796.zipjava.io.IOException: Cannot download 'https://dl.google.com/android/repository/sdk-tools-windows-4333796.zip': Read timed out, response: 200 OKWarning: An error occurred while preparing SDK package Android SDK Tools: Cannot download 'https://dl.google.com/android/repository/sdk-tools-windows-4333796.zip': Read timed out, response: 200 OK."Install Android SDK Tools (revision: 26.1.1)" failed.Preparing "Install SDK Patch Applier v4 (revision: 1)".Downloading https://dl.google.com/android/repository/3534162-studio.sdk-patcher.zip.bakjava.io.IOException: Cannot download 'https://dl.google.com/android/repository/3534162-studio.sdk-patcher.zip.bak': Read timed out, response: 200 OKWarning: An error occurred while preparing SDK package SDK Patch Applier v4: Cannot download 'https://dl.google.com/android/repository/3534162-studio.sdk-patcher.zip.bak': Read timed out, response: 200 OK."Install SDK Patch Applier v4 (revision: 1)" failed.Preparing "Install Android Emulator (revision: 27.3.8)".Downloading https://dl.google.com/android/repository/emulator-windows-4848055.zipjava.io.IOException: Cannot download 'https://dl.google.com/android/repository/emulator-windows-4848055.zip': Read timed out, response: 200 OKWarning: An error occurred while preparing SDK package Android Emulator: Cannot download 'https://dl.google.com/android/repository/emulator-windows-4848055.zip': Read timed out, response: 200 OK."Install Android Emulator (revision: 27.3.8)" failed.Preparing "Install Google Repository (revision: 58)".Downloading https://dl.google.com/android/repository/google_m2repository_gms_v11_3_rc05_wear_2_0_5.zipjava.io.IOException: Cannot download 'https://dl.google.com/android/repository/google_m2repository_gms_v11_3_rc05_wear_2_0_5.zip': Read timed out, response: 200 OKWarning: An error occurred while preparing SDK package Google Repository: Cannot download 'https://dl.google.com/android/repository/google_m2repository_gms_v11_3_rc05_wear_2_0_5.zip': Read timed out, response: 200 OK."Install Google Repository (revision: 58)" failed.Preparing "Install Android SDK Build-Tools 28.0.1 (revision: 28.0.1)".Downloading https://dl.google.com/android/repository/build-tools_r28.0.1-windows.zipjava.io.IOException: Cannot download 'https://dl.google.com/android/repository/build-tools_r28.0.1-windows.zip': SSL peer shut down incorrectly, response: 200 OKWarning: An error occurred while preparing SDK package Android SDK Build-Tools 28.0.1: Cannot download 'https://dl.google.com/android/repository/build-tools_r28.0.1-windows.zip': SSL peer shut down incorrectly, response: 200 OK."Install Android SDK Build-Tools 28.0.1 (revision: 28.0.1)" failed.Preparing "Install Android SDK Platform 28 (revision: 4)".Downloading https://dl.google.com/android/repository/platform-28_r04.zipjava.io.IOException: Cannot download 'https://dl.google.com/android/repository/platform-28_r04.zip': SSL peer shut down incorrectly, response: 200 OKWarning: An error occurred while preparing SDK package Android SDK Platform 28: Cannot download 'https://dl.google.com/android/repository/platform-28_r04.zip': SSL peer shut down incorrectly, response: 200 OK."Install Android SDK Platform 28 (revision: 4)" failed.Parsing D:\Android\sdk\platform-tools\package.xmljava.io.IOException: Cannot download 'https://dl.google.com/android/repository/android_m2repository_r47.zip': SSL peer shut down incorrectly, response: 200 OKWarning: An error occurred while preparing SDK package Android Support Repository: Cannot download 'https://dl.google.com/android/repository/android_m2repository_r47.zip': SSL peer shut down incorrectly, response: 200 OK.java.io.IOException: Cannot download 'https://dl.google.com/android/repository/sdk-tools-windows-4333796.zip': Read timed out, response: 200 OKWarning: An error occurred while preparing SDK package Android SDK Tools: Cannot download 'https://dl.google.com/android/repository/sdk-tools-windows-4333796.zip': Read timed out, response: 200 OK.java.io.IOException: Cannot download 'https://dl.google.com/android/repository/3534162-studio.sdk-patcher.zip.bak': Read timed out, response: 200 OKWarning: An error occurred while preparing SDK package SDK Patch Applier v4: Cannot download 'https://dl.google.com/android/repository/3534162-studio.sdk-patcher.zip.bak': Read timed out, response: 200 OK.java.io.IOException: Cannot download 'https://dl.google.com/android/repository/emulator-windows-4848055.zip': Read timed out, response: 200 OKWarning: An error occurred while preparing SDK package Android Emulator: Cannot download 'https://dl.google.com/android/repository/emulator-windows-4848055.zip': Read timed out, response: 200 OK.java.io.IOException: Cannot download 'https://dl.google.com/android/repository/google_m2repository_gms_v11_3_rc05_wear_2_0_5.zip': Read timed out, response: 200 OKWarning: An error occurred while preparing SDK package Google Repository: Cannot download 'https://dl.google.com/android/repository/google_m2repository_gms_v11_3_rc05_wear_2_0_5.zip': Read timed out, response: 200 OK.java.io.IOException: Cannot download 'https://dl.google.com/android/repository/build-tools_r28.0.1-windows.zip': SSL peer shut down incorrectly, response: 200 OKWarning: An error occurred while preparing SDK package Android SDK Build-Tools 28.0.1: Cannot download 'https://dl.google.com/android/repository/build-tools_r28.0.1-windows.zip': SSL peer shut down incorrectly, response: 200 OK.java.io.IOException: Cannot download 'https://dl.google.com/android/repository/platform-28_r04.zip': SSL peer shut down incorrectly, response: 200 OKWarning: An error occurred while preparing SDK package Android SDK Platform 28: Cannot download 'https://dl.google.com/android/repository/platform-28_r04.zip': SSL peer shut down incorrectly, response: 200 OK.~

因此手动通过迅雷下载如下安装包:

https://dl.google.com/android/repository/platform-tools_r28.0.0-windows.zip

https://dl.google.com/android/repository/platform-28_r04.zip

https://dl.google.com/android/repository/build-tools_r28.0.1-windows.zip

https://dl.google.com/android/repository/google_m2repository_gms_v11_3_rc05_wear_2_0_5.zip

https://dl.google.com/android/repository/emulator-windows-4848055.zip

https://dl.google.com/android/repository/3534162-studio.sdk-patcher.zip.bak

https://dl.google.com/android/repository/sdk-tools-windows-4333796.zip

https://dl.google.com/android/repository/android_m2repository_r47.zip

下载完成后逐个解压缩放入SDK目录,如下:

1、创建SDK目录,并copy上述文件到sdk目录

2、platform-tools_r28.0.0-windows.zip直接接受压缩到本地目录:Sdk\build-tools

3、platform-28_r04.zip解压缩后得到android-9文件夹,把android-9修改为android-28,放到本地目录:Sdk\platforms\android-28

4、build-tools_r28.0.1-windows.zip解压缩后得到android-9文件夹,把android-9修改为28.0.1,放到本地目录:Sdk\build-tools\28.0.1

5、google_m2repository_gms_v11_3_rc05_wear_2_0_5.zip解压缩后得到m2repository文件夹,放到本地目录:Sdk\extras\google\m2repository

6、emulator-windows-4848055.zip解压缩后得到emulator文件夹,放到本地目录:Sdk\emulator

7、3534162-studio.sdk-patcher.zip.bak修改名称为3534162-studio.sdk-patcher.zip,解压缩后得到sdk-patcher,修改名称为patcher放到本地目录:Sdk\patcher\v4

8、sdk-tools-windows-4333796.zip解压缩后得到tools文件夹,放到本地目录:Sdk\tools

9、android_m2repository_r47.zip解压缩后得到m2repository,放到本地目录:Sdk\extras\android\m2repository

上述完成后重新启动Android Studio,创建项目时选择sdk指定到本地Sdk目录。Android Studio检查Sdk目录的文件并显示成功。

创建android app时,如果需要下载安装https://dl.google.com/android/repository/aiasdk-1.3.0-1525823131.zip,也可以使用类似方式,通过迅雷下载aiasdk-1.3.0-1525823131.zip包,然后解压缩得到sdk文件夹,修改sdk名称为instantapps,放到本地目录:Sdk\extras\google\instantapps

作者:忘光光

链接:https://www.jianshu.com/p/fdff7639fd72

來源:简书

简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

手动安装配置Android Studio的更多相关文章

  1. 0.[WP Developer体验Andriod开发]之从零安装配置Android Studio并编写第一个Android App

    0. 所需的安装文件 笔者做了几年WP,近来对Android有点兴趣,尝试一下Android开发,废话不多说,直接进入主题,先安装开发环境,笔者的系统环境为windows8.1&x64. 安装 ...

  2. 0.[Andriod]之从零安装配置Android Studio并编写第一个Android App

    0. 所需的安装文件 笔者做了几年WP,近来对Android有点兴趣,尝试一下Android开发,废话不多说,直接进入主题,先安装开发环境,笔者的系统环境为windows8.1&x64. 安装 ...

  3. 篇一、安装配置Android Studio

    系统:Mac 10.10 Java JDK:官方JDK1.8 IDE:Android Studio 1.2 Android SDK:24.2 模拟器:genymtion 安装 Mac版本的Androi ...

  4. 安装配置 Android Studio

    概述 Android Studio 本身应该是开箱即用的,但是由于 dl.google.com 访问太慢,导致了这样那样的问题,因此我们只需要改一下 hosts 就行了 具体步骤 在Ping检测网站查 ...

  5. 安装并配置 Android Studio 开发工具和 Genymotion 模拟器

    需求说明: 安装并配置 Android Studio 开发工具和 Genymotion 模拟器. 熟练使用 Genymotion 模拟器,掌握 Genymotion 模拟器的基本设置和程序安装. 实现 ...

  6. Ubuntu环境下配置Android Studio【转】

    本文转载自:https://www.jianshu.com/p/1f6295f9c955 之前学习Android开发的时候,一直跟各种教程一样,使用的是Eclipse+ADT,主要是比较方便,容易上手 ...

  7. Visual Studio 开发(一):安装配置Visual Studio Code

    一.为何使用Visual Studio Code 在学习音视频开发的时候,使用到了C和C++,在回顾复习C和C++的知识的时候,需要编写一些代码来加强理解. 虽然,有在线的语言编辑工具https:// ...

  8. 安装Android Studio (一)同时配置Android Studio环境变量

    安装Android Studio 安装android 一直next就行了.这以步需要10分钟左右. 我的安卓SDK在这个目录 C:\Users\user\AppData\Local\Android\s ...

  9. 使用Android Studio创建模拟器,安装配置Android SDK

    Android Studio 一个写安卓APP应用的代码编辑器之类的?嗯,应该是... 这里只是需要用到里面的AVD Manager 创建安卓模拟器(也可以用mumu类的安卓模拟器):SDK Mana ...

随机推荐

  1. pdf.js安装步骤和使用

    从github下载的源码不能直接使用,最好使用命令行下载安装 1.下载源码 git clone git://github.com/mozilla/pdf.js.git cd pdf.js 2.安装no ...

  2. Nginx TCP代理

    nginx 在1.9.0 版本发布以前如果要想做到基于TCP的代理及负载均衡需要通过打名为nginx_tcp_proxy_module的第三方patch来实现,该模块的代码托管在github上 网址: ...

  3. javascript面对对象编程 之继承

    上一篇博客中为大家介绍了javascript面向对象编程原则的封装,今天为大家介绍继承.在javascript中没有类的概念,全部不能像c#.java语言那样.直接的用类去继承类.比方如今有比方.如今 ...

  4. swift开发网络篇—NSURLConnection基本使用

    iOS开发网络篇—NSURLConnection基本使用 一.NSURLConnection的常用类 (1)NSURL:请求地址 (2)NSURLRequest:封装一个请求,保存发给服务器的全部数据 ...

  5. DBeaver无法执行数据库脚本

    网上查了查相关问题,自己写了个步骤,记录下来方便以后查找 此处我连接的是mysql数据库,就以mysql为例说明: 在使用DBeaver过程中,别人给了几个sql文件,想直接导入数据库中,正常流程应该 ...

  6. java回调函数这样说,应该明确了吧!

    有哥们问我回调怎么用,回调怎么理解? 怎么说好呢,仅仅可意会不可言传呐,非也,回调在实际开发中使用频率事实上是非常高的,恰好我小时候也被回调函数欺负过,居然问了,那么肯定要好好分享一下我的一些经验. ...

  7. 英特尔投资:7200万美元投资12家创新公司,包括3家中国公司(www.intelcapital.com)

    集微网消息,英特尔投资——英特尔公司全球投资机构,今天在英特尔投资全球峰会上宣布向12家科技创业公司投资超过7200万美元.加上今天宣布的新投资,英特尔投资在2018年投资总额已超过1.15亿美元. ...

  8. spyder在虚拟机上运行内核一直崩溃

    可能的原因是因为虚拟机设置的内存过小了

  9. POJ 1979 Red and Black (zoj 2165) DFS

    传送门: poj:http://poj.org/problem?id=1979 zoj:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problem ...

  10. [TypeStyle] Add responsive styles using TypeStyle Media Queries

    Media queries are very important for designs that you want to work on both mobile and desktop browse ...