官网下载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. 当数据库没有备份,redo或undo损坏

    数据库在没有备份的情况下,如果数据库redo或undo损坏,可以通过如下方法处理,但是不一定成功 把init文件中的: undo_management=manual 然后启动数据库到mount 状态后 ...

  2. 【AtCoder Beginner Contest 074 C】Sugar Water

    [链接]h在这里写链接 [题意] 让你在杯子里加糖或加水. (4种操作类型) 糖或水之间有一定关系. 糖和水的总量也有限制. 问你糖水浓度的最大时,糖和糖水的量. [题解] 写个dfs就好. 每次有4 ...

  3. MVC中url路由规则

    Routing:首先获取视图页面传过来的请求,并接受url路径中的controller和action以及参数数据,根据规则将识别出来的数据传递给某controller中的某个action方法 MapR ...

  4. 每日技术总结:jquery datetimepicker,微博QQ好友QQ空间微信等分享接口

    前言: 1.jquery datetimepicker 今天遇到一个日期控件格式的问题,默认选中显示的并不是设定的值,而是当天的日期.于是去查了一遍文档. 参考文章:jquery datetimepi ...

  5. 再谈ITFriend网站的定位

    在网站开发阶段.内部测试阶段.公开测试阶段,让诸多好友和网友,参与了我们的网站ITFriend的体验和测试.其中,大家非常关心,我们的网站是干什么的.在我们不做任何解释的情况下,有的网站认为ITFri ...

  6. width:100%和width:inherit

    前几天遇到过这么一个问题.我想让子盒子的宽度等于父盒子的宽度.父盒子宽度为一个具体值比如说200px.我将子盒子宽度设为了100%.按道理说应该是可以等于父盒子的宽度的,但结果并没有,而是通栏了.然后 ...

  7. python3 序列

    python中有很多内置序列 列表 元组 字符串 python中容器的概念 列表 元组 字符串 字典 集合 是可以改变的,元组不可改变 几乎可以在所有情况下用列表代替元组,只有一种情况下,是不可以的, ...

  8. MongoDB集群安装与配置2.4.3版本

    mongoDB安装http://www.mongodb.org/downloads拷文件到# cp mongodb-linux-i686-2.4.1.tgz /usr/local/进入目录:# cd ...

  9. 自己写的关于生产者与消费者模式,还有定时任务的demo

    为了加深对生产者消费者模式的理解,特意写了这个demo,里面还包含了一个自己写的定时任务.代码下载地址:http://download.csdn.net/detail/li_yan_fei/98115 ...

  10. js进阶ajax基本用法(创建对象,连接服务器,发送请求,获取服务器传过来的数据)

    js进阶ajax基本用法(创建对象,连接服务器,发送请求,获取服务器传过来的数据) 一.总结 1.ajax的浏览器的window对象的XMLHtmlRequest对象的两个重要方法:open(),se ...