flutter_sms icon indicating copy to clipboard operation
flutter_sms copied to clipboard

Android: Not compatible with kotlin-gradle-plugin 1.7.xx version

Open ARASHz4 opened this issue 2 years ago • 15 comments

My kotlin-gradle-plugin version is 1.7.20 and is not compatible Please update kotlin-gradle-plugin version in android

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

ARASHz4 avatar Nov 16 '22 09:11 ARASHz4

Dead project ?

chenenyu avatar Dec 14 '22 03:12 chenenyu

+1

Gavin0x0 avatar Feb 08 '23 08:02 Gavin0x0

A migration to a newer AGP version so that we can use current Kotlin versions would be greatly appreciated 🙏🏼

svenjacobs avatar Feb 09 '23 06:02 svenjacobs

any alternative to this dependency?

AliPunjabi avatar Feb 16 '23 11:02 AliPunjabi

+1 Hit the same snag. This is the only dependency causing our project to be unresolvable now.

CrossBread avatar Feb 25 '23 04:02 CrossBread

Is there any way around this like downgrading Kotlin or is that not recommended? What are we supposed to do here?

michaeljajou avatar May 04 '23 20:05 michaeljajou

is fluttercommunity working on this issue? its a serious issue now, our project can not build without this. do anyone know any workaround or any other library?

yashpatel2202 avatar May 15 '23 11:05 yashpatel2202

I have downgraded the flutter version using this flutter downgrade v1.2.1 everything worked fine

Downgrading Flutter to an ancient version (current version of Flutter is 3.10.0) which was released 4 years ago is unfortunately not an option and has other severe consequences.

svenjacobs avatar May 19 '23 15:05 svenjacobs

Here, First, you need to understand this error is caused by the flutter_sms plugin's build.gradle, not with your project. Here, you can wait until the developer to update the kotlin gradle version of the plugin, or you can do by yourself.

Go to the plugin Github page and download the source code and extract the file. Edit the build.gradle file inside the extracted folder. Upgrade the kotlin.gradle by editing the line below:

ext.kotlin_version = '1.7.10'

Now save the file. and go to your pubspec.yaml file to add this package from your local folder like the below:

dependencies: flutter: sdk: flutter background_sms: ^0.0.4 permission_handler: ^10.2.0 flutter_sms: path: C:/Users/Hari Pd. Chaudhary/Downloads/flutter_sms-master sms_advanced: path: C:/Users/Hari Pd. Chaudhary/Downloads/sms_advanced-master

Source: Solved | Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.

hpchari avatar May 23 '23 04:05 hpchari

The Kotlin Gradle plugin issue has been pending since August 2022 https://github.com/fluttercommunity/flutter_sms/pull/71#issuecomment-1292961108

ex-tag avatar Jul 13 '23 06:07 ex-tag

any fork or update about this

thorizer avatar Jul 18 '23 00:07 thorizer

+1 to this! I think there's a PR addressing it? https://github.com/fluttercommunity/flutter_sms/pull/71/files

thefirebanks avatar Aug 13 '23 04:08 thefirebanks

Actually when I download the full source code it has the build.gradle file updated:

buildscript {
    ext.kotlin_version = '1.7.10'
    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.4'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

It appears that the release is not up to date, so just downloading the code and linking it in your project's pubspec.yaml file as @hpchari mentioned should work!

thefirebanks avatar Aug 13 '23 04:08 thefirebanks

The fix has been merged into master in June (https://github.com/fluttercommunity/flutter_sms/pull/81). You can reference it in your project with:

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

But @rodydavis ...please add more contributors and let us help you get these fixes in and deployed to pub.dev 🙏

kvenn avatar Aug 31 '23 02:08 kvenn

Dear @robydavis, please let others help to contribute and maintain this package. 🙏

The fix has been merged into master in June (#81). You can reference it in your project with:

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

But @rodydavis ...please add more contributors and let us help you get these fixes in and deployed to pub.dev 🙏

akifarhan avatar Sep 14 '23 07:09 akifarhan