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
相关推荐
浩宇软件开发19 小时前
Android开发,使用TabLayout+ViewPager2实现校园健康安全宣传
android studio·android开发
Dnelic-1 天前
【单元测试】【Android】JUnit 4 和 JUnit 5 的差异记录
android·junit·单元测试·android studio·自学笔记
佛系小嘟嘟2 天前
Android Studio不显示需要的tag日志解决办法《All logs entries are hidden by the filter》
android·ide·android studio
pkuyjxu2 天前
litepal proguardFiles android studio
android studio·litepal
sinat_384241092 天前
修改Android Studio项目配置JDK路径和项目Gradle路径的GUI工具
android·java·android studio
chem41114 天前
Android studio 呼叫盒app
android·ide·android studio
未来之窗软件服务4 天前
gradle-6.6.1 对应版本配置参数-android studio
android·ide·android studio
未来之窗软件服务4 天前
android studio -gradle Caused by: java.lang.NoClassDefFoundError -换版本方案
android·java·android studio
徐浪老师4 天前
基于 MATLAB 的模拟退火算法详解及实现
android·ide·android studio
徐浪老师5 天前
用 Android Studio 从零开发一个多功能计算器应用
android·ide·android studio