flutter - 在 Android Studio 上运行 Flutter 代码时出现以下错误。(视窗 10)
问题描述
在 Android Studio 上运行 Flutter 代码时出现以下错误。(Windows 10)。我正在使用android-studio-2020.3.1.22-windows
, Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.19043.1165], locale en-IN)
。
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
- package:open_appstore
For solutions, see https://dart.dev/go/unsound-null-safety
FAILURE: Build failed with an exception.
* Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1035
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\src\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 11s
Exception: Gradle task assembleDebug failed with exit code 1
无法解决问题。但它正在工作,当我运行命令时能够看到输出
flutter run --no-sound-null-safety
从终端。似乎是什么问题?
解决方案
您使用的包不支持空安全,请使用空安全包。
推荐阅读
- swift - 大标题看起来不大
- javascript - 如何在html中显示JS字符串值(动态数据)?
- jquery - 如何在dataTable现有列中添加静态数据列
- vb.net - 我如何从 Button1_Click 调用具有“ByVal 控件作为 IRibbonControl”的子类?
- nginx - NGINX 在访问定义的位置时返回 404
- javascript - JS | jQuery - 每个项目的滚动事件
- c# - 使用 LINQ 从列表中删除重复项,获取 System.Linq.Enumerable+WhereSelectEnumerableIterator`2
- c# - 使用自定义控件时 VS 2019 中出现 C# 奇怪的 GUI 错误
- npm - 肥皂节点模块数字签名
- node.js - Mongoose:预钩子没有按预期工作