flutter_html_to_pdf - The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher

70 Views Asked by At

I'm getting this error when trying to run my Flutter app:

FAILURE: Build failed with an exception.

* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
The following dependencies do not satisfy the required version:
project ':flutter_html_to_pdf' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50

Here is my build.gradle file

buildscript {
    ext.kotlin_version = '1.9.22'
    repositories {
        google()
        mavenCentral()
    }

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

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
}

I can't understand why the error is still occurring since the configured version (1.9.22) is greater than the version on error message (1.3.50).

0

There are 0 best solutions below