關(guān)于Android中Gradle和jar包下載慢的問(wèn)題及解決方法
gradle下載慢問(wèn)題
解決方法下載之后自行安裝 ps:就是手動(dòng)更新。官網(wǎng)地址和gradle各版本下載地址:官網(wǎng):http://gradle.org/release-candidate/各版本下載地址:http://services.gradle.org/distributions步驟一:通過(guò)下載地址,然后用自己的下載工具(IDM、迅雷等)進(jìn)行下載。一般來(lái)說(shuō)官網(wǎng)的稍微慢一點(diǎn),看個(gè)人情況來(lái)定。步驟二:把下載的Gradle解壓
步驟三:Android studio中選擇Gradle目錄
步驟四:點(diǎn)擊Apply,之后再點(diǎn)擊OK:ps:一定要點(diǎn)Apply?。?!
步驟五:重啟Android Studio,稍等幾分鐘就可以了。
jar包下載慢問(wèn)題
將build.gradle文件中的兩個(gè)jcenter()修改成國(guó)內(nèi)的源,比如下面用的是阿里的源
// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript { repositories { google() //jcenter() 1、將這個(gè)換成下面的 maven{ url ’http://maven.aliyun.com/nexus/content/groups/public/’} } //?。。∽⒁?,這里不要隨便復(fù)制到自己的項(xiàng)目中 dependencies { classpath 'com.android.tools.build:gradle:4.1.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files }}allprojects { repositories { google() //jcenter() 2、將這個(gè)換成下面的 maven{url ’http://maven.aliyun.com/nexus/content/groups/public/’} }}task clean(type: Delete) { delete rootProject.buildDir}
總結(jié)
到此這篇關(guān)于關(guān)于Android中Gradle和jar包下載慢的問(wèn)題及解決方法的文章就介紹到這了,更多相關(guān)Android Gradle和jar包下載慢內(nèi)容請(qǐng)搜索好吧啦網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持好吧啦網(wǎng)!
相關(guān)文章:
1. moment轉(zhuǎn)化時(shí)間戳出現(xiàn)Invalid Date的問(wèn)題及解決2. python爬蟲(chóng)實(shí)戰(zhàn)之制作屬于自己的一個(gè)IP代理模塊3. 為什么你的android代碼寫得這么亂4. Java剖析工具YourKit 發(fā)布5.0版本5. 跟我學(xué)XSL(一)第1/5頁(yè)6. 使用JSP技術(shù)實(shí)現(xiàn)一個(gè)簡(jiǎn)單的在線測(cè)試系統(tǒng)的實(shí)例詳解7. Python中內(nèi)建模塊collections如何使用8. 動(dòng)態(tài)設(shè)置django的model field的默認(rèn)值操作步驟9. 開(kāi)發(fā)效率翻倍的Web API使用技巧10. Docker創(chuàng)建本地鏡像實(shí)現(xiàn)方法解析
