Android Studio 2020新版本卡在Gradle downloading/sync failed/下載緩慢/下載超時的問題
這個問題卡了我三天
頭都疼了!
最終解決方法
新建一個項目,然后改兩個文件
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版本要統一。
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
三分鐘下完加載完并且沒有報錯,阿里云牛!!?。?!
以后凡是和Marven、Gradle這兩個玩意相關的bug和問題,我一律aliyun鏡像解決好吧!
到此這篇關于Android Studio 2020新版本卡在Gradle downloading/sync failed/下載緩慢/下載超時的問題的文章就介紹到這了,更多相關Android Studio卡在Gradle下載慢內容請搜索好吧啦網以前的文章或繼續瀏覽下面的相關文章希望大家以后多多支持好吧啦網!
相關文章:
1. docker compose idea CreateProcess error=2 系統找不到指定的文件的問題2. 將properties文件的配置設置為整個Web應用的全局變量實現方法3. 一文秒懂idea的git插件跟翻譯插件4. python爬蟲利用代理池更換IP的方法步驟5. layui Ajax請求給下拉框賦值的實例6. Java反射技術原理與用法實例分析7. python中pandas.read_csv()函數的深入講解8. PHP設計模式之迭代器模式Iterator實例分析【對象行為型】9. JS中的常見數組遍歷案例詳解(forEach, map, filter, sort, reduce, every)10. Python語言規范之Pylint的詳細用法
