li經千辛萬苦,我的新工程gradle搞定了
但是卻在變異的時候告訴我
Unable to resolve dependency for ':app@debug/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!大功告成