問題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