[!] 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: │ │ /Users/tusharkhatri/Downloads/bmuptodown/android/settings.gradle, │ │ in the 'plugins' closure. │ │ 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: │ │ /Users/tusharkhatri/Downloads/bmuptodown/android/build.gradle. │ │ │ │ Finally, if you have a strong reason to avoid upgrading AGP, you can temporarily lower the compileSdk version in the following file: │ │ /Users/tusharkhatri/Downloads/bmuptodown/android/app/build.gradle
expected building apk release file
2
Answers
I just ran into the same problem when I mistakenly switched to Flutter’s
master
-branch instead of thestable
-branch. I fixed it by going back to thestable
-branch by running this from the command line:flutter channel stable
.It might not fix the underlying issue, but Flutter recommends using the
stable
-branch for production apps, so it might work for you as well unless you really have to run themaster
-branch.I just ran into the same problem when I upgrade flutter SDK and solve by changing gradle.setting inside /android/ and add those version changes:
And It requires gradle version > 8.0 so change the gradle version inside /android/gradle/wrapper/gradle-wrapper.properties :