fluttercommunity / flutter_sms

A Flutter plugin to Send SMS and MMS on iOS and Android. If iMessage is enabled it will send as iMessage on iOS. This plugin must be tested on a real device on iOS. Maintainer: @rodydavis
https://fluttercommunity.github.io/flutter_sms/
MIT License
246 stars 191 forks source link

Outdated Kotlin Gradle Plugin Version Causing Build Failures #88

Open arizonal2014 opened 1 year ago

arizonal2014 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

Any Alternative of this Library ?

amirhabibz commented 10 months ago

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

dohuon commented 7 months ago

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 commented 5 months ago

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 commented 3 months ago

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 commented 3 months ago

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

  works
SzymonDziak commented 4 days ago

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