cph-cachet / flutter-plugins

A collection of Flutter plugins developed by CACHET
554 stars 681 forks source link

[health:10.2.0] After adding plugin in pubspec.yaml, getting this error : - [!] Your project requires a newer version of the Kotlin Gradle plugin. #979

Closed rvharjinderbains closed 4 months ago

rvharjinderbains commented 5 months ago

health:10.2.0

Describe the bug

After adding health plugin, I got the error that │ [!] Your project requires a newer version of the Kotlin Gradle plugin. however, I have tried the latest kotlin version i.e 1.9.24. This is only working upto health :8.0.1

To Reproduce

Add health plugin in the pubspec and then run the project

Screenshots

Screenshot 2024-06-13 at 5 53 38 PM

Flutter doctor

Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.19.0, on macOS 14.4 23E214 darwin-x64, locale en-IN) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.3) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.3) [✓] Connected device (3 available) ! Error: Browsing on the local area network for iPhoneXR. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27) [✓] Network resources

• No issues found!

Additional information

This is only working upto health :8.0.1

Here is the gradle stuff:- buildscript { ext.kotlin_version = '1.9.24' repositories { google() mavenCentral() }

dependencies {
    classpath 'com.android.tools.build:gradle:7.3.0'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    classpath 'com.google.gms:google-services:4.3.14'
}

}

akastha97 commented 5 months ago

Is there any update on this issue? Even im facing the same problem. Im using health: ^10.2.0 version.

drb1010 commented 4 months ago

inside android/settings.gradle update code like this plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" id "com.android.application" version "7.3.0" apply false id "org.jetbrains.kotlin.android" version "1.9.10" apply false }

rvharjinderbains commented 4 months ago

Hi @drb1010

Thank you so much. It works. I changed

id "org.jetbrains.kotlin.android" version "1.7.10" apply false

to

id "org.jetbrains.kotlin.android" version "1.9.10" apply false

@akastha97 you can also do the same