我正在尝试运行一个flutter应用程序,在尝试时出现了这个错误,我所做的是我想在没有android studio的情况下运行flutter应用程序,所以我下载了android SDK和JDK 17,在我运行flutter doctor之后它给了我一切都很好,我尝试运行,但它给了我这个错误:
FAILURE: Build failed with an exception.
* Where:
Build file 'E:\Flutter Apps\first_app\android\build.gradle'
* What went wrong:
Could not compile build file 'E:\Flutter Apps\first_app\android\build.gradle'.
> startup failed:
General error during semantic analysis: Unsupported class file major version 61
.............
Run Code Online (Sandbox Code Playgroud)
所以我尝试了旧版本的 JDK,它给了我另一个错误,所以我看到了使用 JDK 17 运行的第三种解决方案,即降级 gradle.properties 中的 gradle,但它只给了我第四个错误,所以任何人都这样做知道这个错误的最终解决方案吗?
flutter ×1