Reputation: 81
Error:Unable to find method 'com.android.build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir(Ljava/io/File;)V'.
Possible causes for this unexpected error include:
Upvotes: 8
Views: 8045
Reputation: 1761
Though its late but I am posting this solution (worked for me) to help if someone get same error.
I built a project on android-studio 3.0.1
and the gradle value was gradle-4.1-all.zip
.
But when I tried to build same project on android-studio 2.2.3
I got this error. As my gradle version is gradle-2.14.1-all.zip
So by changing distributionUrl
property in gradle-wrapper.properties
file fixed this error for me.
Upvotes: 10