当我尝试使用 Get 运行颤振应用程序时出现错误:
Running Gradle task 'assembleDebug'...
../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/get-4.6.1/lib/get_navigation/src/root/get_cupertino_app.dart:252:17: Error: No named parameter with the name 'useInheritedMediaQuery'.
useInheritedMediaQuery: useInheritedMediaQuery,
^^^^^^^^^^^^^^^^^^^^^^
/E:/fluttersdk/flutter/packages/flutter/lib/src/cupertino/app.dart:188:9: Context: Found this candidate, but the arguments don't match.
const CupertinoApp.router({
^^^^^^^^^^^^^^^^^^^
../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/get-4.6.1/lib/get_navigation/src/root/get_cupertino_app.dart:292:17: Error: No named parameter with the name 'useInheritedMediaQuery'.
useInheritedMediaQuery: useInheritedMediaQuery,
^^^^^^^^^^^^^^^^^^^^^^
E:/fluttersdk/flutter/packages/flutter/lib/src/cupertino/app.dart:144:9: Context: Found this candidate, but the arguments don't match.
const CupertinoApp({
^^^^^^^^^^^^
../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/get-4.6.1/lib/get_navigation/src/root/get_material_app.dart:275:17: Error: No named parameter with the name 'useInheritedMediaQuery'.
useInheritedMediaQuery: useInheritedMediaQuery,
^^^^^^^^^^^^^^^^^^^^^^
/E:/fluttersdk/flutter/packages/flutter/lib/src/material/app.dart:219:9: Context: Found this candidate, but the arguments don't match.
const MaterialApp.router({
^^^^^^^^^^^^^^^^^^
../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/get-4.6.1/lib/get_navigation/src/root/get_material_app.dart:322:17: Error: No named parameter with the name 'useInheritedMediaQuery'.
useInheritedMediaQuery: useInheritedMediaQuery,
^^^^^^^^^^^^^^^^^^^^^^
/E:/fluttersdk/flutter/packages/flutter/lib/src/material/app.dart:168:9: Context: Found this candidate, but the arguments don't match.
const MaterialApp({
^^^^^^^^^^^
FAILURE: Build failed with an exception.
* Where:
Script 'E:\fluttersdk\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1052
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'E:\fluttersdk\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 12s
Exception: Gradle task assembleDebug failed with exit code 1
有谁知道如何解决这一问题?我查看了类似的主题并尝试了他们的提示 - 没有任何帮助。使用 GetMaterialApp 包装的主要小部件:
void main() => runApp(GetMaterialApp(home: MainScreen()));