參考博客:https://blog.csdn.net/Y74364/article/details/96121530
目錄
報錯:read time out(Android Studio首次安裝出現Read time out解決辦法)
一、安裝
下載Android Studio 網址:
http://www.android-studio.org/
https://www.androiddevtools.cn/
1. 進入下載的網站,選擇合適的版本進行下載,我下載的版本如下:
2. 下載好安裝包之後,雙擊運行,雙擊後可能會等待較長的時間,出現以下界面,點擊next
點擊next
更改AndroidStudio的安裝地址後,點擊next。默認安裝在C盤,我將其安裝到了F盤
點擊install
點擊next
點擊finish
點擊ok
點擊cancle
點擊next
點擊next
選擇主題顏色,點擊next
開始走進度條
點擊finish
二、創建一個新的項目
1. 點擊新建一個項目:
2. 選擇Empty Activity,點擊next
3. 開發語言選擇Java,點擊finish
報錯:read time out(Android Studio首次安裝出現Read time out解決辦法)
方法一:手動下載gradle
這個方法我嘗試後依舊報錯Read time out,但還是記錄在這裏
1. 進入 http://services.gradle.org/distributions/ 下載對應版本的gradle
gradle的版本查看方法:
鼠標移動到這裏,發現是5.4.1-all.zip,下載對應的
2. 將下載的壓縮包直接放到C:\Users\iwaed\.gradle\wrapper\dists\gradle-5.4.1-all\3221gyojl5jsh0helicew7rwx(最後那個文件夾會有差異)
方法二:更改build.gradle內的內容,親測可用
打開build.gradle,在google()和jcenter()之間加上一句話:
maven{ url'http://maven.aliyun.com/nexus/content/groups/public/'}
需要更改兩處:
然後點擊下圖紅圈圖標,sync projects with gradle files
等待一會兒,成功。
三、新建Android Studio模擬器
1.選擇Open AVD Manager
2. 點擊右下角的 + create virtual device……
3. 選擇一個,然後點擊next
4. 選擇一個版本,點擊download,等進度條跑完,點擊finish
5.然後選則對應的模擬器,點擊綠色的三角形
報錯AXM is required to run this AVD.
VT-x is disabled in BIOS.
Enable VT-x in your BIOS security settings (refer to documentation for your computer).
報錯:AXM is required to run this AVD.VT-x is disabled in BIOS.Enable VT-x in your BIOS security settings (refer to documentation for your computer).聯想電腦解決辦法
重啓電腦,開機的時候按F2,進入到BIOS界面,Configuration -> Intel Virtual Technology,按enter將disable更改爲enable,然後按下F10保存
6.開機後再次嘗試,可以正常運行虛擬機。
Android Studio提示Your anti-virus program might be impacting your build performance. Android Studio checked the following directories:……解決辦法
報錯信息: Your anti-virus program might be impacting your build performance. Android Studio checked the following directories:
C:\Users\iwaed\.AndroidStudio3.5\system
C:\Users\iwaed\.gradle
F:\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk
D:\AndroidStudioProjects\teat01
解決辦法: 把上面提到的文件夾在殺毒軟件中添加信任即可