I create sample flutter project, and try to use Flutter_html, when I try to add html() widget and when run the project I got the following error

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 ':wakelock' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50

  • Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

the build.gradle file as following

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

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

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
}

1

There are 1 answers

1
Alain C. Jiménez On

There's actually 1 issue in their Github repo about that same problem. Meanwhile you can fork the repo, and update the gradle dependency in your own forked version. Even you can suggest a PR linking to your forked version if it solves the issue.