Unable to resolve dependency for ‘:app@debug/compileClasspath’: Could not download
Students, do you feel familiar when you see this line of code?
This is the problem I encountered today. I pulled down the code and wanted to run it. It was because my colleague added a new dependency, but I still couldn’t download it. Then I clicked the icon to reload the dependency and wanted to download it. But he didn't download it after downloading for a long time, saying that there was a problem with the proxy, the connection failed or something. I have tried a lot of methods before, such as modifying the mirror image, but none of them succeeded, but today this problem was solved at once
First
find the .gradle file under your C disk, then open the gradle.properties file, and then comment out all the things in it,
like this, and then reopen the project
I am using the 3.6.3 version of Android Studio. When I reopen it, there will be a prompt box, which is to set the proxy, and then click Yes without setting anything. Then the project can be restored to normal