Forcibly clear gradle dependency cache and gradle Cache
Today, my colleague mistakenly uploaded a database and deleted it again...
I just handed down the library he uploaded... Then the project always reports an error, clean... Re-compile... Delete the build file .... All do not use =
Several people have studied it for a long time and can only guess that it is a cache problem... It is useless to delete all the project caches .... It should be the problem of gradle caching...
There are a lot of gradle versions on my computer, and the path is hard to find... It's really hard to do ....
After work, my colleagues ran all .... You can only search for it by yourself !!!
Looking back, gradle caching is quite common. Colleagues should have blogs... Hurry up to Baidu...
Indeed, there are many related blogs on the Internet. After reading the first article, I saw the solution ....
It is too difficult to find a path. It is more reliable to force remote pull of dependencies ....
You can use the command line to forcibly pull dependencies...
Windows: gradlew build -- refresh-dependencies Mac:./gradlew build -- refresh-dependencies
After the command is completed, wait for the AS to execute the command and re-compile it. The project runs normally !!!
Remember the sadness of looking for a path without a brain ~~~