okadan/flutter-nfc-manager

Android Gradle error when building Flutter app with nfc_manager 3.5.0

tomfong opened this issue · 0 comments

flutter doctor -v:

[✓] Flutter (Channel stable, 3.19.6, on macOS 14.4 23E214 darwin-arm64, locale en-US)
    • Flutter version 3.19.6 on channel stable at ...
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 54e66469a9 (5 months ago), 2024-04-17 13:08:03 -0700
    • Engine revision c4cd48e186
    • Dart version 3.3.4
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at ...
    • Platform android-35, build-tools 35.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

[✓] Android Studio (version 2024.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)

pubspec.yaml:

dependencies:
  flutter:
    sdk: flutter

  nfc_manager: ^3.5.0

Error message:

FAILURE: Build failed with an exception.

* What went wrong:
The Android Gradle plugin supports only kotlin-android-extensions Gradle plugin version 1.6.20 and higher.
The following dependencies do not satisfy the required version:

project ':nfc_manager' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10