最佳答案
在我的 flutter 项目中,我对插件进行了一些更新,然后使用 flutter 升级。在此之后,每当我运行我的颤振项目显示以下错误-
/C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/platform-3.0.2/lib/src/interface/local_platform.dart:46:19: Error: Member not found: 'packageRoot'.
io.Platform.packageRoot; // ignore: deprecated_member_use
^^^^^^^^^^^ FAILURE: Build failed with an exception.
* Where: Script 'C:\src\flutter\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1102
* What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\src\flutter\flutter\bin\flutter.bat'' finished with non-zero exit value 1
* Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 20s Exception: Gradle task assembleDebug failed with exit code 1
所以,我需要一个建议,我该如何解决这个问题?