android Studio 出現:Unable to resolve dependency for ':app@debug/compileClasspath'


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!大功告成

 

 

來自:https://www.cnblogs.com/fengfenghuifei/p/10098054.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM