How to Install and Set up Android Studio on Windows?
System Requirements
OS:windows 10 pro
Android Studio version:2020.3.1 for windows
Microsoft Windows 7/8/10 (32-bit or 64-bit)
4 GB RAM minimum, 8 GB RAM recommended (plus 1 GB for the Android Emulator)
2 GB of available disk space minimum, 4 GB recommended (500 MB for IDE plus 1.5 GB for Android SDK and emulator system image)
1280 x 800 minimum screen resolution
Installation Guide
Download and Install Android Studio
Start the Android Studio
-Meanwhile, it will be finding the available SDK components.
-Meanwhile, it will be download the SDK components
android studio uses as its embedded JDK
Step 1.Download Android Studio
Android Studio is the official IDE (Integrated Development Environment) for Android app development and it is based on JetBrains’ IntelliJ IDEA software.
首先我们需要下载Android Studio,大家可以在网上下载Android Studio正式版,建议选择英文版,养成使用英文工具的习惯。使用Android Studio为例介绍安装过程,官方稳定版下载地址为:https://developer.android.google.cn/studio?hl=zh-cn。
https://developer.android.google.cn/studio#downloads
Download android-studio-2020.3.1.26-windows.exe(Windows
(64-bit))
Official Download url:
安装 Android Studio用户指南(官网)
https://developer.android.google.cn/studio/install?hl=zh-cn
Other:
1.官网下载Android Studio下载不了
解决办法:
右上角 中文-简体 改成 ENGLISH 即可
Step 2.Install Android Studio First
下载后进行安装。安装方法将其解压后点击setup.exe进行安装。
官方稳定版,在 developer.android.com/studio 下载
Step 3.Run Android Studio First
安装成功之后,开始是没有SDK的,但是SDK是运行必备的.
如果一切正常,所有SDK 如下:
D:\Android\android-sdk
or
SDK path: C:\Users\Administrator2\AppData\Local\Android\Sdk
C:\Users\Administrator2>cd C:\Users\Administrator2\AppData\Local\Android\Sdk
C:\Users\Administrator2\AppData\Local\Android\Sdk>dir
C:\Users\Administrator2\AppData\Local\Android\Sdk dir
2021/12/17 07:50 <DIR> .
2021/12/17 07:50 <DIR> ..
2021/12/17 07:50 <DIR> .downloadIntermediates
2021/12/17 07:50 16 .knownPackages
2021/12/17 07:50 <DIR> .temp
2021/12/15 06:16 <DIR> build-tools
2021/12/17 07:50 <DIR> emulator
2021/12/15 06:15 <DIR> licenses
2021/11/03 03:15 <DIR> patcher
2021/11/03 03:13 <DIR> platform-tools
2021/12/15 06:17 <DIR> platforms
2021/12/14 23:26 <DIR> skins
2021/12/17 06:19 <DIR> sources
2021/11/03 03:16 <DIR> tools
解决Android Studio启动时下载更新Android SDK网络异常或无法下载的问题
第一次启动Android Studio,会遇到下载更新Android SDK网络异常或无法下载的问题。
如果重新安装Android Studio,在安装SDK时也会提示网络异常。
Unable to access Android SDK add-on list
原因:
找不到 dl.google.com 的服务器 IP 地址
s1:修改hosts文件(Android studio不设置代理,直接从官网下载 SDK的解决办法)
203.208.40.99 - 中国上海 google.com 电信
203.208.40.104 - 中国上海 google.com 电信
203.208.40.96 - 中国上海 google.com 电信
203.208.40.100 - 中国上海 google.com 电信
203.208.40.102 - 中国上海 google.com 电信
203.208.40.97 - 中国上海 google.com 电信
203.208.40.98 - 中国上海 google.com 电信
203.208.40.101 - 中国上海 google.com 电信
203.208.40.103 - 中国上海 google.com 电信
203.208.40.105 - 中国上海 google.com 电信
203.208.40.110 - 中国上海 google.com 电信
用Win+R打开cmd窗口,ping一下这些IP地址。
以查询到的第一个结果203.208.40.99 为例
C:\Users\Administrator2>ping 203.208.40.99
正在 Ping 203.208.40.99 具有 32 字节的数据:
来自 203.208.40.99 的回复: 字节=32 时间=25ms TTL=117
来自 203.208.40.99 的回复: 字节=32 时间=24ms TTL=117
来自 203.208.40.99 的回复: 字节=32 时间=25ms TTL=117
来自 203.208.40.99 的回复: 字节=32 时间=25ms TTL=117
203.208.40.99 的 Ping 统计信息:
数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 24ms,最长 = 25ms,平均 = 24ms
第一个地址的的速度就不错,就用这个
修改hosts文件
path:C:\Windows\System32\drivers\etc\hosts
加上Everyone权限
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
185.199.108.133 raw.githubusercontent.com
203.208.40.99 dl.google.com
s2:Android studio设置代理,从代理网站下载 SDK的解决办法(不推荐)
HTTP Proxy System Settings : Android studio->Menu
Tools > SDK Manager->HTTP Proxy System Settings
解决方法如下:HTTP Proxy中Host name设置为mirrors.neusoft.edu.cn,此为东软信息学院自己的开源镜像站.
mirrors.neusoft.edu.cn
第一次启动
HTTP Proxy中Host name设置为mirrors.neusoft.edu.cn
Other:
安装成功之后,开始是没有SDK的,但是SDK是运行必备的.
Android Studio 打开 SDK manager(SDK 管理器),请依次点击 Tools > SDK Manager
Android SDK Platform
开发环境中必须至少有一个平台(Android 11.0-R),每个版本均提供多种不同的软件包。仅下载所需版本
Android SDK Platform 30
Online Android SDK Manager
The Online Android SDK Manager is a online tool that allows you to Download and update packages for the Android SDK.
The sdkmanager tool is provided in the Android SDK Tools package (25.2.3 and higher) and is located in android_sdk/tools/bin/.
Once downloaded, you can extract the downloaded zip file in the appropriate directory indicated inside as the Android SDK Location.
https://androidsdkmanager.azurewebsites.net/Buildtools#top
Packages to install:
- Android Emulator (emulator)
Preparing "Install Android Emulator (revision: 31.1.4)".
Downloading https://dl.google.com/android/repository/emulator-windows_x64-7920983.zip
Android online emulator
四、Android Studio更新 IDE 和 SDK
如果要更新Android Studio IDE 和 SDK 工具,可以重新安装Android Studio,官方更新 IDE 和 SDK 工具的地址为:
https://developer.android.google.cn/studio/intro/update?hl=zh-cn
bulild tools版本的更新日志
https://developer.android.google.cn/studio/releases/build-tools
.https://androidsdkmanager.azurewebsites.net/Buildtools
Useful links
https://www.geeksforgeeks.org/guide-to-install-and-set-up-android-studio/