Android studio gradle build failed with update

2019-06-20 07:10发布

问题:

I recently updated android studio to version 3.2. When I tried running my old project, I got the following message for my old project while running grade build:

"The Android Gradle plugin supports only Kotlin Gradle plugin version 1.2.51 and higher.

Project '4thtry' is using version 1.2.50." How to rectify it?

回答1:

Go to your root Build.gradle and update the Kotlin.

(Better idea): Add the latest version: ext.kotlin_version = '1.2.71' (or above of 1.2.50) instead of 1.2.50 then rebuild the project.

So we'll have;

buildscript {
    ext.kotlin_version = '1.2.71'
    repositories {
..
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
...
}