Uranus_ly
Uranus_ly

Reputation: 151

error: Your project requires a newer version of the Kotlin Gradle plugin

I've coppied source coudes from other's. I got problem with kotlin version. I changed the version in build.gradle file, but it still happens. How can I work arrange this

buildscript {
ext.kotlin_version = '1.7.10' // Change here
repositories {
    google()
    jcenter()
}

dependencies {
    classpath 'com.android.tools.build:gradle:4.1.0'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}

}

─ Flutter Fix ────────────────────────────────────────────────────────────────────────────────┐

│ [!] Your project requires a newer version of the Kotlin Gradle plugin. │ │ Find the latest version on https://kotlinlang.org/docs/gradle.html#plugin-and-versions, then │ │ update /Users/rocat/Downloads/Awesome-Flutter-Layouts-master/android/build.gradle: │ │ ext.kotlin_version = '' │ └──────────────────────────────────────────────────────────────────────────────────────────────┘ Exception: Gradle task assembleDebug failed with exit code 1

Upvotes: 2

Views: 4224

Answers (1)

Robert Sandberg
Robert Sandberg

Reputation: 8635

In android/gradle/wrapper/gradle-wrapper.properties

Bump the following line to something matching:

distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip

Edit:

Also change to this in android/gradle/build.gradle

classpath 'com.android.tools.build:gradle:7.1.2'

Upvotes: 0

Related Questions