Reputation: 75
I tried build an app to send sms using flutter. I used examples of flutter_sms and sms_advance. Noth are not work. An error occured as
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
According to the some helps, I checked and results are, 1 build.gradle
buildscript {
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
the result was whe check gradle version on command line.
C:\Users\Hemantha>gradle -v
------------------------------------------------------------
Gradle 8.3
------------------------------------------------------------
Build time: 2023-08-17 07:06:47 UTC
Revision: 8afbf24b469158b714b36e84c6f4d4976c86fcd5
Kotlin: 1.9.0
Groovy: 3.0.17
Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM: 1.8.0_281 (Oracle Corporation 25.281-b09)
OS: Windows 10 10.0 amd64
android version is Girrafe, and pubspec.yaml
environment:
sdk: '>=3.1.0 <4.0.0'
dependencies:
flutter:
sdk: flutter
flutter_phone_direct_caller: ^2.1.1
flutter_sms: ^2.3.3
cupertino_icons: ^1.0.2
dev_dependencies:
flutter_test:
sdk: flutter
....
direct caller example also is working. but not succeed sms. Please can anyone help me to solve this.
Upvotes: 1
Views: 313