使用compileSdk 35需要Android Gradle插件(AGP)8.1.0或更高版本:构建apk发布文件时出现颤振错误

问题描述 投票:0回答:1

[!] 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                                 

预期构建 apk 发布文件

flutter dart android-studio
1个回答
0
投票

当我错误地切换到 Flutter 的

master
分支而不是
stable
分支时,我刚刚遇到了同样的问题。我通过从命令行运行以下命令返回到
stable
分支来修复它:
flutter channel stable

它可能无法解决根本问题,但 Flutter 建议对生产应用程序使用

stable
分支,因此它也可能适合您,除非您确实必须运行
master
分支。

© www.soinside.com 2019 - 2024. All rights reserved.