Error debugging VSCode Flutter “Execution failed for task ‘:app:compileDebugKotlin’. […] Failed to transform […].jar to match attributes

I am stuck with the following error when I try debugging in VSCode with flutter emulator for Android devices.
What I tried:

  • flutter precache
  • flutter clean + flutter pub get
  • these workarounds – keep giving the same error

At first, it seemed that updating Java and Gradle would fix the problem, but then it started giving this (I haven’t been able to run the code yet):

ERROR:

         > Failed to transform mokoSupport.jar to match attributes {artifactType=android-classes-jar, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
            > Execution failed for JetifyTransform: C:DEVELOPMENTFLUTTER_PROJECTSble_provaXXXandroidappapplibsmokoSupport.jar.
               > Transform's input file does not exist: C:DEVELOPMENTFLUTTER_PROJECTSble_provaXXXandroidappapplibsmokoSupport.jar. (See https://issuetracker.google.com/issues/158753935)

      * 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 8s

      ┌─ Flutter Fix ─────────────────────────────────────────────────────────────┐
      │ This issue appears to be https://github.com/flutter/flutter/issues/58247. │
      │ Fix this issue by adding the following to the file                        │
      │ C:DEVELOPMENTFLUTTER_PROJECTSble_provaXXXandroidappbuild.gradle:    │
      │ android {                                                                 │
      │   lintOptions {                                                           │
      │     checkReleaseBuilds false                                              │
      │   }                                                                       │
      │ }                                                                         │
      └───────────────────────────────────────────────────────────────────────────┘
      Error: Gradle task assembleDebug failed with exit code 1

My android/build.gradle

    buildscript {
ext.kotlin_version = '1.9.20'
repositories {
    jcenter()
    google()
    mavenCentral()
}
dependencies {
    classpath 'com.android.tools.build:gradle:8.4.0'
    classpath 'com.jakewharton:butterknife-gradle-plugin:10.2.3'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}

    }




    rootProject.buildDir = '../build'


    allprojects {
 
    repositories { 
            mavenCentral()
            jcenter()
            google()
      }
      }
      subprojects {
          project.buildDir = "${rootProject.buildDir}/${project.name}"
      }
      subprojects {
          project.evaluationDependsOn(':app')
      }
      
      tasks.register("clean", Delete) {
          delete rootProject.buildDir
      }
      

My app/build.gradle

      plugins {
          id "com.android.application"
          id "kotlin-android"
          id "dev.flutter.flutter-gradle-plugin"
      }
      apply(plugin: "com.android.application")
      apply(plugin: "kotlin-android")

      def localProperties = new Properties()
      def localPropertiesFile = rootProject.file('local.properties')
      if (localPropertiesFile.exists()) {
          localPropertiesFile.withReader('UTF-8') { reader ->
              localProperties.load(reader)
          }
      }

      def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
      if (flutterVersionCode == null) {
          flutterVersionCode = '1'
      }

      def flutterVersionName = localProperties.getProperty('flutter.versionName')
      if (flutterVersionName == null) {
          flutterVersionName = '1.0'
      }

      android {
          namespace "com.example.ble_prova"
          compileSdk flutter.compileSdkVersion
          ndkVersion flutter.ndkVersion
          lintOptions {
              checkReleaseBuilds false
          }
          compileOptions {
              sourceCompatibility JavaVersion.VERSION_17
              targetCompatibility JavaVersion.VERSION_17
          }
      
          kotlinOptions {
              jvmTarget = '1.8'
          }
      
          sourceSets {
             main.java.srcDirs += 'src/main/kotlin'
          }

          defaultConfig {
              // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
              applicationId "com.example.ble_prova"
              // You can update the following values to match your application needs.
              // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
              minSdkVersion flutter.minSdkVersion
              targetSdkVersion flutter.targetSdkVersion
              versionCode flutterVersionCode.toInteger()
              versionName flutterVersionName
          }

          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 files('mokosupport\libs\mokoBleLib.jar')
          implementation files('app\libs\mokoBleLib.jar')
          implementation files('app\libs\mokoSupport.jar')
          implementation project(path: ':mokosupport')
      }

My settings.gradle

      pluginManagement {
          def flutterSdkPath = {
              def properties = new Properties()
              file("local.properties").withInputStream { properties.load(it) }
              def flutterSdkPath = properties.getProperty("flutter.sdk")
              assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
              return flutterSdkPath
          }
          settings.ext.flutterSdkPath = flutterSdkPath()

          includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")

          repositories {
              google()
              mavenCentral()
              gradlePluginPortal()
          }
      }

      plugins {
          id "dev.flutter.flutter-plugin-loader" version "1.0.0"
          id "com.android.application" version "7.3.0" apply false
          id "org.jetbrains.kotlin.android" version "1.9.20" apply false
      }

      include ":app",':mokosupport'

Java version openJDK 17.0.11 / Gradle version 8.5 / Kotlin version 1.9.20

I really do not understand how to fix this. Please help, I really don’t know what else to do.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật