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
CodePudding user response:
try change kotlin version at line: ext.kotlin_version = '1.7.10' // Change here it should be like : ext.kotlin_version = '1.5.20' or any other version see from here - https://kotlinlang.org/docs/releases.html#release-details
CodePudding user response:
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'