li經千辛萬苦,我的新工程gradle搞定了
但是卻在變異的時候告訴我
Unable to resolve dependency for ':[email protected]/compileClasspath'xxx
等等,導致我的所有的依賴都拿不下來
我去,這不是要我的命嗎
然後又是一番折騰,但是好在有貴人相助,wanAndroid群裡一位大佬發了一個連結,說讓我按照這個連結裡的方法試試,
說了那麼多,都是拋磚引玉
https://www.jianshu.com/p/0d0ebb86dd17?utm_campaign=haruki&utm_content=note&utm_medium=reader_share&utm_source=qq
嗯,就這樣,這就是大佬的解決辦法。
主要是就是使用了 proxy
systemProp.https.proxyHost=mirrors.neusoft.edu.cn
systemProp.http.proxyPort=80
這個代理導致,所以在C盤:使用者/使用者名稱/目錄下找到.gradle資料夾裡的gradle.properties 檔案註釋掉prox使用即可
## For more details on how to configure your build environment visit # http://www.gradle.org/docs/current/userguide/build_environment.html # # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. # Default value: -Xmx1024m -XX:MaxPermSize=256m # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 # # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true #Mon Dec 10 12:56:38 CST 2018 #systemProp.http.proxyHost=mirrors.neusoft.edu.cn #systemProp.https.proxyPort=80
如圖最下面兩行被註釋了,你按照這個試試,就行了
OK!大功告成