skip to Main Content

After upgrade Flutter we facing issue

┌─ Flutter Fix ────────────────────────────────────────────────────────────────────────────────────┐
│ [!] Using compileSdk 35 requires Android Gradle Plugin (AGP) 8.1.0 or higher.                    │
│  Please upgrade to a newer AGP version. The version of AGP that your project uses is likely      │
│  defined in:                                                                                     │
│ G:FlutterTesting Projecttestandroidsettings.gradle,                                │
│ in the 'plugins' closure (by the number following "com.android.application").                    │
│  Alternatively, if your project was created with an older version of the templates, it is likely │
│ in the buildscript.dependencies closure of the top-level build.gradle:                           │
│ G:FlutterTesting Projecttestandroidbuild.gradle,                                   │
│ as the number following "com.android.tools.build:gradle:".                                       │
│                                                                                                  │
│  Finally, if you have a strong reason to avoid upgrading AGP, you can temporarily lower the      │
│  compileSdk version in the following file:                                                       │
│ G:FlutterTesting Projecttestandroidappbuild.gradle                                │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘

I tried change version 8.1 to 8.4 : distributionUrl=https://services.gradle.org/distributions/gradle-8.4-all.zip

but not solved issue

2

Answers


  1. Create new flutter app and observe new versions and structure of AGP and gradle from files
    gradle-wrapper.properties
    settings.gradle
    build.gradle
    app/build.gradle
    More over, we don’t know how old your project, take a look at AndroidManifest file

    Login or Signup to reply.
  2. In addition to what you did, you may try also this
    Modify android>settings.gradle file with this

    id "com.android.application" version "8.3.2" apply false

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search