Android Studio 2020新版本卡在Gradle downloading/sync failed/下載緩慢/下載超時的問題
這個問題卡了我三天
頭都疼了!
最終解決方法
新建一個項(xiàng)目,然后改兩個文件
build.gradle里面改成這個:
buildscript { repositories { maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:4.1.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files }}allprojects { repositories { maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } google() jcenter() }}task clean(type: Delete) { delete rootProject.buildDir}
gradle版本我選擇4.1.1 上下兩個文件里面的gradle版本要統(tǒng)一。
gradle-wrapper.properties這樣改
distributionBase=GRADLE_USER_HOMEdistributionPath=wrapper/distszipStoreBase=GRADLE_USER_HOMEzipStorePath=wrapper/distsdistributionUrl=https://services.gradle.org/distributions/gradle-4.1.1-all.zip
三分鐘下完加載完并且沒有報(bào)錯,阿里云牛!!!!!
以后凡是和Marven、Gradle這兩個玩意相關(guān)的bug和問題,我一律aliyun鏡像解決好吧!
到此這篇關(guān)于Android Studio 2020新版本卡在Gradle downloading/sync failed/下載緩慢/下載超時的問題的文章就介紹到這了,更多相關(guān)Android Studio卡在Gradle下載慢內(nèi)容請搜索好吧啦網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持好吧啦網(wǎng)!
相關(guān)文章:
1. python GUI庫圖形界面開發(fā)之PyQt5動態(tài)(可拖動控件大小)布局控件QSplitter詳細(xì)使用方法與實(shí)例2. ASP將數(shù)字轉(zhuǎn)中文數(shù)字(大寫金額)的函數(shù)3. XML 非法字符(轉(zhuǎn)義字符)4. ASP 處理JSON數(shù)據(jù)的實(shí)現(xiàn)代碼5. js開發(fā)中的頁面、屏幕、瀏覽器的位置原理(高度寬度)說明講解(附圖)6. CSS清除浮動方法匯總7. 不要在HTML中濫用div8. vue跳轉(zhuǎn)頁面常用的幾種方法匯總9. CSS3實(shí)例分享之多重背景的實(shí)現(xiàn)(Multiple backgrounds)10. XML入門的常見問題(三)
