手动安装配置Android Studio

官网下载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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 202,723评论 5 476
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 85,080评论 2 379
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 149,604评论 0 335
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,440评论 1 273
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,431评论 5 364
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,499评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,893评论 3 395
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,541评论 0 256
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,751评论 1 296
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,547评论 2 319
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,619评论 1 329
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,320评论 4 318
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,890评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,896评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,137评论 1 259
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 42,796评论 2 349
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,335评论 2 342

推荐阅读更多精彩内容