Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android build fail (after upgrade flutter 2.10.3) #99

Open
blueddarker opened this issue Mar 5, 2022 · 6 comments
Open

Android build fail (after upgrade flutter 2.10.3) #99

blueddarker opened this issue Mar 5, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@blueddarker
Copy link

on iOS it's work but on Android I have this error during the build:

  • What went wrong:
    Execution failed for task ':amplitude_flutter:compileDebugKotlin'.

Compilation error. See log for more details

  • 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 17s
Running Gradle task 'assembleDevDebug'... 18.4s

┌─ Flutter Fix ───────────────────────────────────────────────────────────────────────────────────────┐
│ [!] Your project requires a newer version of the Kotlin Gradle plugin. │
│ Find the latest version on https://kotlinlang.org/docs/gradle.html#plugin-and-versions, then update │
│ /Users/imsangcheol/Working/TripleComma/dev/goldspoon-app/android/build.gradle: │
│ ext.kotlin_version = '' │
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
Gradle task assembleDevDebug failed with exit code 1

Flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.3, on macOS 12.1 21C52 darwin-arm, locale ko-KR)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.1)
[✓] VS Code (version 1.65.0)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

Environment

  • SDK Version: amplitude_flutter: ^3.8.1
@blueddarker blueddarker added the bug Something isn't working label Mar 5, 2022
@yuhao900914
Copy link
Contributor

Hi @blueddarker ,
What's your kotlin gradle plugin version? Is it higher than 1.3.40?

@blueddarker
Copy link
Author

@yuhao900914
Yes, kotlin gradle plugin version is 1.6.10

@ahmedbob3
Copy link

the same issue flutter 2.10.5
kotlin 1.6.10

@yuhao900914
Copy link
Contributor

Hey there,
Thanks for using amplitude flutter. However, I cannot reproduce this issue on my side and everything works fine. I created an example app here, using
kotlin gradle plugin 1.6.10
flutter 2.10.3
amplitude_flutter 3.8.1
Please take a look.

One thing I can think, can you try to clean the cache and run the app again?
flutter clean
flutter pub get
flutter pub cache repair
dart pub cache repair

@zjamshidi
Copy link

I'm facing the same error:

* 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 ':amplitude_flutter' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.40

classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10"
Flutter 3.0.1 • channel stable
amplitude_flutter: ^3.10.0

@zjamshidi
Copy link

@yuhao900914 the version of the Kotlin Gradle plugin used in the library is '1.3.40'.

ext.kotlin_version = '1.3.40'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants