问题1:
Error:Unable to find method 'com.android.build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir(Ljava/io/File;)V'.
解决方案
1.将classpath 修改为你本地的路径
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
// NOTE: Do not place your application dependencies here; they belong
}
2.如果是从android studio3.0以后的项目,在android studio 3.0以前上跑,还要将app下的build.gradle中的implementation修改为compile
3.第二部完成分后,接着在该文件下compileSdkVersion 下面添加buildToolsVersion ""
buildToolsVersion "26.0.2"
4.打开gradle目录下的wrapper目录下gradle-wrapper.properties的这个文件,将distributionUrl=https://services.gradle.org/distributions/中最后的gradle修改为自己的gradle
distributionUrl=https://services.gradle.org/distributions/gradle-2.14.1-all.zip