compileSdkVersion 匹配 sdk 版本但“不支持的 Gradle 版本"; [英] compileSdkVersion matches sdk version but "unsupported version of Gradle"
本文介绍了compileSdkVersion 匹配 sdk 版本但“不支持的 Gradle 版本";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在 app/build.gradle 中有以下规范
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"
}
安装了 sdk 25 (Android 7)
And the sdk 25 (Android 7) installed
运行Build APK"时出现以下错误
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.)
我该如何解决?
推荐答案
转到 Android Studio 的菜单并访问 File
->Project Structure
然后转到 Project
标记并将数据更改为:
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
按Ok
,然后清理并重建项目,可能会使缓存失效并之前重新启动.
Press Ok
and then clean and rebuild project, maybe invalidate caches and restarting before.
这篇关于compileSdkVersion 匹配 sdk 版本但“不支持的 Gradle 版本";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文