溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

解決android studio 3.0 加載項(xiàng)目過(guò)慢問(wèn)題--maven倉(cāng)庫(kù)選擇

發(fā)布時(shí)間:2020-08-24 14:15:24 來(lái)源:腳本之家 閱讀:174 作者:mrr 欄目:移動(dòng)開(kāi)發(fā)

今天用android studio 3.0打開(kāi)項(xiàng)目時(shí)發(fā)現(xiàn)一直在谷歌的maven倉(cāng)庫(kù)加載

解決android studio 3.0 加載項(xiàng)目過(guò)慢問(wèn)題--maven倉(cāng)庫(kù)選擇

卡到這不動(dòng)了,看了下maven倉(cāng)庫(kù)的配置發(fā)現(xiàn):

buildscript {
  repositories {
    jcenter()
    maven {
      url 'https://maven.google.com'
      name 'Google'
    }
    google()
  }
  dependencies {
    classpath 'com.android.tools.build:gradle:3.0.0'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
  }
}
allprojects {
  repositories {
    jcenter()
    maven {
      url 'https://maven.google.com'
      name 'Google'
    }
    google()
  }
}
task clean(type: Delete) {
  delete rootProject.buildDir
}

maven倉(cāng)庫(kù)的路徑居然是:https://maven.google.com

后來(lái)在網(wǎng)上找了個(gè)阿里云上面的maven地址,配置如下:

buildscript {
  repositories {
    jcenter()
    maven {
      url 'http://maven.aliyun.com/nexus/content/groups/public'
//      name 'Google'
    }
    google()
  }
  dependencies {
    classpath 'com.android.tools.build:gradle:3.0.0'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
  }
}
allprojects {
  repositories {
    jcenter()
    maven {
      url 'http://maven.aliyun.com/nexus/content/groups/public'
//      name 'Google'
    }
    google()
  }
}
task clean(type: Delete) {
  delete rootProject.buildDir
}

這之后就發(fā)現(xiàn)加載快多了。

總結(jié)

以上所述是小編給大家介紹的解決android studio 3.0 加載項(xiàng)目過(guò)慢問(wèn)題--maven倉(cāng)庫(kù)選擇,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)歡迎給我留言,小編會(huì)及時(shí)回復(fù)大家的!

向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI