compileSdkVersion匹配sdk版本但是#34;不支持的Gradle版本#34;

时间:2018-05-24 16:37:38

标签: android-studio android-gradle apk

使用app app / build.gradle中的以下规范

compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
    applicationId "ir.iiscenter.shub"
    minSdkVersion 16
    targetSdkVersion 25
    versionCode 25
    versionName "2.6.7"
    vectorDrawables.useSupportLibrary = true
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

安装了sdk 25(Android 7)

enter image description here

通过运行"构建APK"

,我收到以下错误
The project is using an unsupported version of Gradle.
Please point to a supported Gradle version in the project's Gradle settings or in the project's Gradle wrapper (if applicable.)

我该如何解决?

1 个答案:

答案 0 :(得分:2)

转到Android Studio的菜单并访问File - > Project Structure,然后转到Project标签并将数据更改为:

Gradle version: 4.4
Android Plugin Version: 3.1.2
Android Plugin Repository: google(), jcenter
Default Library Repository: google(), jcenter

Ok,然后清理并重建项目,可能会使缓存失效并重新启动。