Reputation: 15
when try to building my flutter some of errors showing
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_native_timezone' -> 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.
Get more help at https://help.gradle.org
BUILD FAILED in 3s
Exception: Gradle task assembleDebug failed with exit code 1
build.gradle file (changed kotlin version)
buildscript {
ext.kotlin_version = '1.6.21'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
kotlin plugin is up to date on android studio Also tried to debug with latest version but no use
I searched another articles but not solved my problem.
Tanks for your helping advance
Upvotes: 0
Views: 1205
Reputation: 67
You need to update your kotlin_version of the package or you must reduce your gradle version. To update kotlin_version of the package: In your computer, go to this path: "C:\Users\YOUR_USERNAME\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_native_timezone-VERSION\android\build.gradle" -> this is the path of the package gradle, change it:
buildscript {
ext.kotlin_version = '1.6.21' //Change here to 1.6.21
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Upvotes: 0