flutter - 很长一段时间后无法运行 Flutter 应用程序
问题描述
我在两个月前开发了一个应用程序,我今天需要添加一个新功能,所以我今天打开了这个项目。但我无法编译该项目,它只会引发错误,我不明白如何解决它。我有 cached_network_image , youtube_player_flutter 包。
我在下面粘贴了我的错误日志
Compiler message:
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/youtube_player_flutter-
5.2.0/lib/src/player/raw_youtube_player.dart:55:30: Error: Getter not found: 'suspending'.
case AppLifecycleState.suspending:
^^^^^^^^^^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.
FAILURE: Build failed with an exception.
* Where:
Script '/Users/flutter/Developer/flutter/packages/flutter_tools/gradle/flutter.gradle' line:
780
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/Users/flutter/Developer/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 23s
FAILURE: Build failed with an exception.
* What went wrong:
Could not get unknown property 'ANDROIDX_WARNING' for project ':youtube_player' of type
org.gradle.api.Project.
* 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 23s
Finished with error: Gradle task assembleDebug failed with exit code 1
解决方案
推荐阅读
- react-native - 使用 npx 命令运行 react-native 项目
- python - %04 和 %02 在 Python 中究竟做了什么?
- javascript - vue-awesome-swiper 中的自定义转换
- javascript - `atob` 抛出“要解码的字符串未正确编码”
- stata - 在 Stata 的相关矩阵中将星星添加到 p<.05
- ios - UICollectionviewcell 的 contentView 中的 UITextfield 不注册点击
- c# - 如何通过单击按钮更改文本框文本
- string - 最小串数旋转问题的证明
- flutter - Flutter:关闭深色模式主题
- algorithm - 当我们考虑时间复杂度时,如何找到这两个函数的关系?