Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
失败:生成失败,出现异常。任务';的执行失败:应用程序:compileFlutterBuildDebug';_Flutter_Flutter Dependencies - Fatal编程技术网

失败:生成失败,出现异常。任务';的执行失败:应用程序:compileFlutterBuildDebug';

失败:生成失败,出现异常。任务';的执行失败:应用程序:compileFlutterBuildDebug';,flutter,flutter-dependencies,Flutter,Flutter Dependencies,我在android设备上运行我的项目时遇到了这个错误 Execution failed for task ':app:compileFlutterBuildDebug'. 我尝试了这些命令--flatter clean-flatter pub get,但应用程序没有运行 ../../flutterSDK/flutter/.pub-cache/hosted/pub.dartlang.org/dynamic_theme-1.0.1/lib/dynamic_theme.dart:25:46: E

我在android设备上运行我的项目时遇到了这个错误

Execution failed for task ':app:compileFlutterBuildDebug'.
我尝试了这些命令-
-flatter clean
-flatter pub get
,但应用程序没有运行

  ../../flutterSDK/flutter/.pub-cache/hosted/pub.dartlang.org/dynamic_theme-1.0.1/lib/dynamic_theme.dart:25:46: Error: Method not found: 'TypeMatcher'.
    return context.ancestorStateOfType(const TypeMatcher<DynamicThemeState>());
                                             ^^^^^^^^^^^
../../flutterSDK/flutter/.pub-cache/hosted/pub.dartlang.org/dynamic_theme-1.0.1/lib/dynamic_theme.dart:25:20: Error: The method 'ancestorStateOfType' isn't defined for the class 'BuildContext'.
 - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('../../flutterSDK/flutter/packages/flutter/lib/src/widgets/framework.dart').
Try correcting the name to the name of an existing method, or defining a method named 'ancestorStateOfType'.
    return context.ancestorStateOfType(const TypeMatcher<DynamicThemeState>());
                   ^^^^^^^^^^^^^^^^^^^
3

FAILURE: Build failed with an exception.

* Where:
Script '/Users/helpos/flutterSDK/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1035

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/Users/helpos/flutterSDK/flutter/bin/flutter'' 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 1m 58s
Exception: Gradle task assembleDebug failed with exit code 1
。/../flatterSDK/flatter/.pub cache/hosted/pub.dartlang.org/dynamic_theme-1.0.1/lib/dynamic_theme.dart:25:46:错误:找不到方法:“TypeMatcher”。
返回context.anteStorStateofType(const TypeMatcher());
^^^^^^^^^^^
../../flatterSDK/flatter/.pub cache/hosted/pub.dartlang.org/dynamic_theme-1.0.1/lib/dynamic_theme.dart:25:20:错误:未为类“BuildContext”定义方法“ancestorStateOfType”。
-“BuildContext”来自“package:flatter/src/widgets/framework.dart”(“../../flattersdk/flatter/packages/flatter/lib/src/widgets/framework.dart”)。
尝试将名称更正为现有方法的名称,或定义名为“ancestorStateOfType”的方法。
返回context.anteStorStateofType(const TypeMatcher());
^^^^^^^^^^^^^^^^^^^
3.
失败:生成失败,出现异常。
*其中:
脚本'/Users/helpos/flattersdk/flatter/packages/flatter_tools/gradle/flatter.gradle'行:1035
*出了什么问题:
任务“:app:compileFlutterBuildDebug”的执行失败。
>进程“command”/Users/helpos/flattersdk/flatter/bin/flatter”以非零退出值1结束
*尝试:
使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获得更多日志输出。使用--scan运行以获得完整的洞察力。
*得到更多的帮助https://help.gradle.org
生成在1m 58s内失败
异常:Gradle任务assembleDebug失败,退出代码为1
当我运行
flatter doctor--v

[✓] 颤振(通道稳定,2.2.1,在Mac OS X 10.15 19A583 darwin-x64上,语言环境en GB)
•颤振版本2.2.1 at/Users/helpos/颤振SDK/颤振
•框架版本02c026b03c(7天前),2021-05-27 12:24:44-0700
•发动机版本0fdb562ac8
•Dart版本2.13.1
[✓] Android工具链-为Android设备开发(Android SDK版本30.0.3)
•Android SDK位于/Users/helpos/Library/Android/SDK
•平台android-30,构建工具30.0.3
•ANDROID_HOME=/Users/helpos/Library/ANDROID/sdk
•Java二进制地址:/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/Java
•Java版本OpenJDK运行时环境(build 1.8.0_242-release-1644-b3-6915495)
•接受所有Android许可证。
[!]Xcode-为iOS和macOS开发
•Xcode at/Applications/Xcode.app/Contents/Developer
•Xcode 11.0,内部版本11A420a
✗ Xcode 11.0.0已过时(建议使用12.0.1)。
通过Mac App Store下载最新版本或更新。
•CocoaPods版本1.10.1
[✓] Chrome-为web开发
•Chrome at/Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio(4.1版)
•Android Studio位于/Applications/Android Studio.app/Contents
•颤振插件可从以下位置安装: