Android Studio安装SDK失败解决办法

Android Studio安装SDK失败解决办法

安装SDK时界面会显示安装的连接,同时在你选择的安装SDK的文件夹里面会生成一些目录和文件,在你选择放SDK的目录下有一个叫做.temp的文件夹,里面放的就是下载的临时文件。

.temp内部的文件夹里面能看到下载的具体文件名,我们可以直接复制在下载信息框的链接,粘贴到浏览器或者下载器里面下载,下载完了之后把下载的文件放到.temp文件夹内部的对应文件夹内。放好自己下载的文件后,把自动生成的那个带文件名的文件删掉,简单来说就是用自己下载好的去替换临时下载文件,这样就会被识别为下载完成并会自动解压安装。

我是实测成功了才截图的,所以,temp文件夹内没有任何文件夹了,因为都下载安装完成了。

粘一下安装SDK所有输出信息

javascript 复制代码
Preparing "Install Android Emulator v.32.1.15".   //这是要安装的文件名
//这是要下载的文件链接,可以自己复制到浏览器下载然后替换
Downloading https://dl.google.com/android/repository/emulator-windows_x64-10696886.zip
java.net.SocketException: Connection reset
//下载失败提示
Warning: An error occurred while preparing SDK package Android Emulator: Connection reset.
"Install Android Emulator v.32.1.15" failed.


Preparing "Install Google APIs Intel x86_64 Atom System Image API 34 (revision 10)".
Downloading https://dl.google.com/android/repository/sys-img/google_apis/x86_64-34_r10.zip
//下载失败
java.net.SocketException: Connection reset
Warning: An error occurred while preparing SDK package Google APIs Intel x86_64 Atom System Image: Connection reset.
"Install Google APIs Intel x86_64 Atom System Image API 34 (revision 10)" failed.


Preparing "Install Android Emulator hypervisor driver (installer) v.2.0.0".
Downloading https://dl.google.com/android/repository/gvm-windows_v2_0_0.zip
"Install Android Emulator hypervisor driver (installer) v.2.0.0" ready.
Installing Android Emulator hypervisor driver (installer) in D:\ProgramFiles\AndroidSDK\extras\google\Android_Emulator_Hypervisor_Driver
"Install Android Emulator hypervisor driver (installer) v.2.0.0" complete.
"Install Android Emulator hypervisor driver (installer) v.2.0.0" finished.

Preparing "Install Sources for Android 34 (revision 2)".
Downloading https://dl.google.com/android/repository/sources-34_r01.zip
"Install Sources for Android 34 (revision 2)" ready.
Installing Sources for Android 34 in D:\ProgramFiles\AndroidSDK\sources\android-34
"Install Sources for Android 34 (revision 2)" complete.
"Install Sources for Android 34 (revision 2)" finished.

Preparing "Install Android SDK Platform 34 (revision 2)".
Downloading https://dl.google.com/android/repository/platform-34-ext7_r02.zip
"Install Android SDK Platform 34 (revision 2)" ready.
Installing Android SDK Platform 34 in D:\ProgramFiles\AndroidSDK\platforms\android-34
"Install Android SDK Platform 34 (revision 2)" complete.
"Install Android SDK Platform 34 (revision 2)" finished.

Preparing "Install Android SDK Build-Tools 34 v.34.0.0".
Downloading https://dl.google.com/android/repository/build-tools_r34-windows.zip
"Install Android SDK Build-Tools 34 v.34.0.0" ready.
Installing Android SDK Build-Tools 34 in D:\ProgramFiles\AndroidSDK\build-tools\34.0.0
"Install Android SDK Build-Tools 34 v.34.0.0" complete.
"Install Android SDK Build-Tools 34 v.34.0.0" finished.

Preparing "Install Android SDK Platform-Tools v.34.0.5".
Downloading https://dl.google.com/android/repository/platform-tools_r34.0.5-windows.zip
"Install Android SDK Platform-Tools v.34.0.5" ready.
Installing Android SDK Platform-Tools in D:\ProgramFiles\AndroidSDK\platform-tools
"Install Android SDK Platform-Tools v.34.0.5" complete.
"Install Android SDK Platform-Tools v.34.0.5" finished.

Parsing D:\ProgramFiles\AndroidSDK\build-tools\34.0.0\package.xml
Parsing D:\ProgramFiles\AndroidSDK\extras\google\Android_Emulator_Hypervisor_Driver\package.xml
Parsing D:\ProgramFiles\AndroidSDK\platform-tools\package.xml
Parsing D:\ProgramFiles\AndroidSDK\platforms\android-34\package.xml
Parsing D:\ProgramFiles\AndroidSDK\sources\android-34\package.xml
//下载失败提示
java.net.SocketException: Connection reset
Warning: An error occurred while preparing SDK package Android Emulator: Connection reset.
java.net.SocketException: Connection reset
Warning: An error occurred while preparing SDK package Google APIs Intel x86_64 Atom System Image: Connection reset.


//这里我重试下载,然后替换法,安装成功
Preparing "Install Android Emulator v.32.1.15".
"Install Android Emulator v.32.1.15" ready.
Installing Android Emulator in D:\ProgramFiles\AndroidSDK\emulator
"Install Android Emulator v.32.1.15" complete.
"Install Android Emulator v.32.1.15" finished.


Preparing "Install Google APIs Intel x86_64 Atom System Image API 34 (revision 10)".
Downloading https://dl.google.com/android/repository/sys-img/google_apis/x86_64-34_r10.zip
"Install Google APIs Intel x86_64 Atom System Image API 34 (revision 10)" ready.
Installing Google APIs Intel x86_64 Atom System Image in D:\ProgramFiles\AndroidSDK\system-images\android-34\google_apis\x86_64
"Install Google APIs Intel x86_64 Atom System Image API 34 (revision 10)" complete.
"Install Google APIs Intel x86_64 Atom System Image API 34 (revision 10)" finished.

Parsing D:\ProgramFiles\AndroidSDK\build-tools\34.0.0\package.xml
Parsing D:\ProgramFiles\AndroidSDK\emulator\package.xml
Parsing D:\ProgramFiles\AndroidSDK\extras\google\Android_Emulator_Hypervisor_Driver\package.xml
Parsing D:\ProgramFiles\AndroidSDK\platform-tools\package.xml
Parsing D:\ProgramFiles\AndroidSDK\platforms\android-34\package.xml
Parsing D:\ProgramFiles\AndroidSDK\sources\android-34\package.xml
Parsing D:\ProgramFiles\AndroidSDK\system-images\android-34\google_apis\x86_64\package.xml

Android SDK is up to date.

Running Android Emulator hypervisor driver installer
//错误信息,给了个网址,我自己去这个网站下载的,然后运行一下就好了
Android Emulator hypervisor driver installation failed. To install Android Emulator hypervisor driver follow the instructions found at: https://github.com/google/android-emulator-hypervisor-driver
Creating Android virtual device
Android virtual device Pixel_3a_API_34_extension_level_7_x86_64 was successfully created
相关推荐
小林爱27 分钟前
【Compose multiplatform教程08】【组件】Text组件
android·java·前端·ui·前端框架·kotlin·android studio
小何开发2 小时前
Android Studio 安装教程
android·ide·android studio
我又来搬代码了7 小时前
【Android Studio】创建新项目遇到的一些问题
android·ide·android studio
Calvin8808281 天前
Android Studio 的革命性更新:Project Quartz 和 Gemini,开启 AI 开发新时代!
android·人工智能·android studio
tanghongchang1231 天前
Mac Android studio 升级LadyBug 版本,所产生的bug
macos·android studio·ladybug
叶羽西2 天前
Android Studio打开一个外部的Android app程序
android·ide·android studio
咸芝麻鱼3 天前
Android Studio | 连接手机设备后,启动App时出现:Waiting For DebuggerApplication (App名)...
android·adb·智能手机·android studio
叶羽西3 天前
Android Studio Gradle Sync timeout
android·ide·android studio
qq_397562314 天前
android studio更改应用图片,和应用名字。
android·ide·android studio
峥嵘life4 天前
Android Studio版本升级那些事
android·ide·android studio