14、Could not determine the class-path for interface com.android.builder.model.AndroidProject.

错误:Error:Could not determine the class-path for interface com.android.builder.model.AndroidProject.

原因: eclipse导出工程的时候gradle版本比较低造成,所以要更改gradle配置

解决:复制以往正常的项目2处配置

1、修改build.gradle(gradle版本号跟android{…})

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
    }
}

android {
    compileSdkVersion 26
    buildToolsVersion '26.0.3'
    ......
}

2、gradle-wrapper.properties

#Tue Dec 26 10:09:46 CST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

你可能感兴趣的:(AS常见报错)