Error:Unable to find method 'com.android.build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir(Ljava/io/File;)V'.
Possible causes for this unexpected error include:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With