Gradle‘s dependency cache may be corrupt [How to Solve]

Problem Description:

1
2
3
4
5
6
7
Error:Unable to find method 'com.google.common.cache.CacheBuilder.build(Lcom/google/common/cache/CacheLoader;)Lcom/google/common/cache/LoadingCache;'.
Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.

Solution:

1.Delete the .gradle directories both in your home directory and at the top level of your project.
Gradle’s cache directoires aren’t affected by the “Clear caches and restart” option.
Is to delete the following folders: own directory and project directory :

    
2. If the above has not been resolved, just
follow : The gradle version is modified in gradle-wrapper.properties, which is consistent with the gradle version that has not reported an error before. That’s it.
I changed it to:
http\://services.gradle.org/distributions/gradle-2.10-all.zip

Reference: http://stackoverflow.com/questions/27770909/android-studio-gradle-sync-error

 

Similar Posts: