compileSdkVersion matches sdk version but “unsupported version of Gradle”

做~自己de王妃 提交于 2020-01-06 07:43:29

问题


With the following specs in thee 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"
}

And the sdk 25 (Android 7) installed

I get the following error by running "Build 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.)

How can I fix that?


回答1:


Go to menu of your Android Studio and access File->Project Structure then go to Project label and change data to:

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

Press Ok and then clean and rebuild project, maybe invalidate caches and restarting before.



来源:https://stackoverflow.com/questions/50514251/compilesdkversion-matches-sdk-version-but-unsupported-version-of-gradle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!