79462752

Date: 2025-02-24 07:51:01
Score: 1
Natty:
Report link

As the error says, you need the latest version of the Kotlin Gradle Plugin.

Fixing the Kotlin Gradle Plugin Version Error

  1. Update Kotlin Version

    • Open your root build.gradle file.

    • Upgrade ext.kotlin_version to the latest (e.g., 2.1.10):

      ext.kotlin_version = '2.1.10' //as of 24/2/2025
      
  2. Clean and Reset Gradle

    • Run:

      flutter clean
      
    • Delete the android/.gradle folder.

  3. Update Gradle Version

    • Open android/gradle/wrapper/gradle-wrapper.properties.

    • Update distributionUrl to a compatible version (e.g., from 5.6.2 to 6.1.1):

      distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
      
  4. Rebuild Your Project

    • Run:

      flutter pub get
      flutter run
      

You can also go through these stackoverflow answers for more details.

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Noob Saibot