Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Flutter version 3.19.2 requires a newer version of the Kotlin Gradle plugin. /android/build.gradle: ext.kotlin_version = '<latest-version>'

I have a question about Flutter version 3.19.2. In this version, Flutter has removed the buildscript from the /android/build.gradle file:

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
}

Now, I’m wondering where to put the latest version of Kotlin. Could someone please guide me on the appropriate location for specifying the Kotlin version in this updated configuration?

Thank you in advance!

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I have attempted to search for information on the Flutter documentation website under Breaking Changes, but I couldn’t find anything related to this particular issue.

>Solution :

kotlin plugin version is shifted to settings.gradle in newer version of flutter.
you can find kotlin plugin version in settings.gradle inside plugins tag

plugins {
    id "dev.flutter.flutter-plugin-loader" version "1.0.0"
    id "com.android.application" version "{agpVersion}" apply false
    id "org.jetbrains.kotlin.android" version "{kotlinVersion}" apply false
}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading