'Execution failed for task ':fluttertoast:compileDebugKotlin'. #new update

I'm trying to run the app in the new flutter updated stable version 2.10.2 My code working fine before the update I'm getting this error now android/app/build.gradle

buildscript {
repositories {
    google()
    mavenCentral()
}
dependencies {
    classpath 'com.android.tools.build:gradle:4.1.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')

}

task clean(type: Delete) {
delete rootProject.buildDir

}



Solution 1:[1]

Rollback Gradle version to 3.5.4

classpath 'com.android.tools.build:gradle:3.5.4'

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 nagendra nag