I have created a new project. When I add flutter_nfc_kit:
then it gives the error:
Your project requires a newer version of the Kotlin Gradle plugin.
But when I open the android level build.gradle file, it does not have the kotlin version. When I try to add kotlin latest version manually then issue does not resolve. My build.gradle after adding kotlin version is :
buildscript {
ext.kotlin_version = '2.0.0'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0"
classpath 'com.google.gms:google-services:4.3.10'
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
Please advice on this issue. It only appears in new projects and it always taking kotlin version 1.7.1 by default.
1