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

Outdated Kotlin Gradle Plugin Version Causing Build Failures #88

Open
arizonal2014 opened this issue Aug 24, 2023 · 9 comments · May be fixed by #90
Open

Outdated Kotlin Gradle Plugin Version Causing Build Failures #88

arizonal2014 opened this issue Aug 24, 2023 · 9 comments · May be fixed by #90

Comments

@arizonal2014
Copy link

Hello,

I recently integrated the flutter_sms package into my Flutter project and encountered a build error related to the Kotlin Gradle plugin version.

Error Message:
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 ':flutter_sms' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50

Upon inspection, it seems that the flutter_sms package is using Kotlin Gradle plugin version 1.3.50, which is not compatible with the latest Android Gradle plugin versions.

@arizonal2014
Copy link
Author

arizonal2014 commented Aug 24, 2023

If anyone else is facing this issue, here's a step-by-step solution:

Local Copy of flutter_sms:

Clone or download the flutter_sms plugin from its GitHub repository to your local machine.

git clone [repository_url] path/to/local/flutter_sms

Update pubspec.yaml:

dependencies:
  flutter_sms:
    path: path/to/local/flutter_sms

Modify Kotlin Version:

Navigate to path/to/local/flutter_sms/android/build.gradle and update the Kotlin version to match the version required by your project.

Fetch Updated Dependencies:

Run flutter pub get in your terminal.

Clean and Rebuild:
Ensure everything compiles correctly:

flutter clean
flutter run

I hope this helps others who might be facing the same issue! Would be great if the maintainer could update the Kotlin version in the official repository to cater to the wider audience.

@PatidarManish
Copy link

Any Alternative of this Library ?

@amirhabibz
Copy link

Could the author please consider updating the kotlin-gradle-plugin for this?

@xurc xurc linked a pull request Feb 8, 2024 that will close this issue
@dohuon
Copy link

dohuon commented Mar 6, 2024

This issue was resolved 10 months ago, but it doesn't seem to have been properly reflected in the repository. Applying the following to the pubspec.yaml should resolve it.

  flutter_sms:
    git:
      url: https://github.com/fluttercommunity/flutter_sms.git
      ref: master

@zestones
Copy link

zestones commented May 5, 2024

This issue was resolved 10 months ago, but it doesn't seem to have been properly reflected in the repository. Applying the following to the pubspec.yaml should resolve it.

  flutter_sms:
    git:
      url: https://github.com/fluttercommunity/flutter_sms.git
      ref: master

This worked for me many thanks !!

@Sumit8171
Copy link

This issue was resolved 10 months ago, but it doesn't seem to have been properly reflected in the repository. Applying the following to the pubspec.yaml should resolve it.

  flutter_sms:
    git:
      url: https://github.com/fluttercommunity/flutter_sms.git
      ref: master

This worked for me many thanks !!

working

@spencerblauw
Copy link

flutter_sms:
git:
url: https://github.com/fluttercommunity/flutter_sms.git
ref: master

  works

@SzymonDziak
Copy link

not working

This issue was resolved 10 months ago, but it doesn't seem to have been properly reflected in the repository. Applying the following to the pubspec.yaml should resolve it.

  flutter_sms:
    git:
      url: https://github.com/fluttercommunity/flutter_sms.git
      ref: master

not working

@mihail-varbanov
Copy link

mihail-varbanov commented Oct 9, 2024

Not working for me either:

  #flutter_sms: ^2.3.3
  flutter_sms:
    git:
      url: https://github.com/fluttercommunity/flutter_sms.git
      ref: master
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':flutter_sms:compileDebugKotlin'.
> Inconsistent JVM-target compatibility detected for tasks 'compileDebugJavaWithJavac' (1.8) and 'compileDebugKotlin' (17).

  Consider using JVM Toolchain: https://kotl.in/gradle/jvm/toolchain
  Learn more about JVM-target validation: https://kotl.in/gradle/jvm/target-validation 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants