Solution 1 :
Your error itself gave you the solution. You need to upgrade kotlin-stdlib-jdk7 dependencies version in this line.
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
Find where $kotlin_version
is defined. Change it to latest version as defined on Official Kotlin Release page
Problem :
-
What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher.
The following dependencies do not satisfy the required version:
project ‘:drawerbehavior’ -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71 -
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 4s
Running Gradle task ‘assembleRelease’…
Running Gradle task ‘assembleRelease’… Done 5.3s
Gradle task assembleRelease failed with exit code 1
android {
compileSdkVersion 28
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.sununigeriaflutter"
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source ‘../..’
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
Comments
Comment posted by Ace
This does not work and current version of
Comment posted by nitinkumarp
Yes @ace it is now but 2 years back it was 1.3.61. Basically update your kotlin version to the latest.