skip to Main Content

I know that androidbuild.gradle includes buildscript. but build.gradle in my project doesn’t have buildscript. so I can’t solve following error.

C:/Users/JG-H/.gradle/caches/transforms-3/2ae0bf9da71bed198914dc960cb2262f/transformed/jetified-kotlin-stdlib-common-1.9.0.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
.
.
.

┌─ Flutter Fix ──────────────────────────────────────────────────────────────────────────────┐
│ [!] Your project requires a newer version of the Kotlin Gradle plugin. │
│ Find the latest version on https://kotlinlang.org/docs/releases.html#release-details, then │
│ update C:UsersJG-HDesktopFlutter practice 20242.little │
│ spicyweather_appandroidbuild.gradle: │
│ ext.kotlin_version = ” │
└────────────────────────────────────────────────────────────────────────────────────────────┘

how can i find buildscript in build.gradle??
following is my buildgradle.’

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 have copied buildscript in my other project.
but it can’t be run.

2

Answers


  1. i am also facing the same issue cause im trying to add some dependencies (firebase) inside bluildscript i couldnt manage to do it . i thought at first maybe i created the app differently and i did it again and its still the case .
    i am talking about android>build.gradle . meanwhile the android>app>build.gradle is the same as most codes i saw.

    Login or Signup to reply.
  2. I after the new upgrade of flutter 3.19. some change happen in android folder. you can find detail in this link https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply or https://medium.com/@iam.umairimran/flutter-app-migration-guide-updating-to-flutter-3-19-0-ab8b66008838 . buildscript not exist anymore in in build.gradle . also you need to upgrade user gradle. then flutter clean . flutter pub get

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search