[Solved] Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.

In this example, we are going to show you how to solve the "The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher. The following dependencies do not satisfy the required version" error in Flutter. See the article below:

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

OR

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

Cause 1: Your Project is using Kotlin Gradle plugin version lower than 1.3.50

Cause 2: If this error is caused by any plugin or package used in your project as mentioned in the error message, then that plugin is using Kotlin Gradle plugin version lower than 1.3.50.

Solution 1: If this error is caused directly by your project, then go to android/build.gradle file, and change the following line:

ext.kotlin_version = '1.3.50'

TO

ext.kotlin_version = '1.7.10' // OR any latest version

Now run flutter clean command, and run your project.

Solution 2: If this error is caused by any plugin used in your project, as mentioned in the error message below:

The following dependencies do not satisfy the required version:
project ':flutter_sms' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50

Here, we got the issue on flutter_sms, because the flutter_sms plugin is using Kotlin gradle version lower than 1.5.20, now its time to upgrade the Kotlin version of this plugin. You might get this issue with another plugin as well. 

Now go to the Plugin Page at pub.dev

Now, click on Github Repository link. Download the ZIP file of the source code of the plugin.

Now, extract the zip file, and edit the folderpath/android/build.gradle

Now change the following lines:

ext.kotlin_version = '1.3.50'

TO

ext.kotlin_version = '1.7.10' // OR any latest version

Now, save the build.gradle file of the plugin folder.

Now go to the pubspec.yaml file on your project, and add this package 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

Here, flutter_sms and sms_advanced plugins are added from our download local file. Don't forget to replace the path with your own folder location.

In this way, you can solve the "The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher. The following dependencies do not satisfy the required version" error in Flutter." error in Flutter.

3 Comments on this Article

ABDUL RAHMAN AUF

Please help me, my dialogflow_grsc is not compatible. it has been two years since that dialogflow not updated. now whatever version i use will be error the latest or previous ones help me

2 months ago

Gabs

Hi!

Doesn’t work because the zip downloaded from git doesn’t contain sms_advanced,

sms_advanced: path: C:/Users/Hari Pd. Chaudhary/Downloads/sms_advanced-master
9 months ago

Hari Prasad Chaudhary

Please change the path to your local path. This is from our computer. 

6 months ago


Please Wait...