在下面的代码(Dart 2.4.0 Windows)中,从指示字符串返回类型的将来返回null将导致:
I/flutter ( 8735): The following assertion was thrown building Builder:
I/flutter ( 8735): type 'Future<dynamic>' is not a subtype of type 'Future<String>'
如果我返回"null as String;",VSCode会显示警告“不必要的类型转换”,但是,代码可以工作,并
安装火焰后,当我在flutter中运行我的应用程序时(flutter run)。我得到了一个关于null安全的长错误:
Running Gradle task 'assembleDebug'...
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
- package:flame
- package:ordered_set
- package:box2d_flame
- package:audioplaye
当我从github运行一个flutter项目时,我得到了这个错误...我什么都试过了。我试了很多命令,但都没成功 Try correcting the name to the name of an existing getter, or defining a getter or field named 'headline'.
theme.primaryTextTheme.headline;
^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org
我尝试过构建应用程序'flutter_html:^2.1.5‘,但我无法在日志中生成并获得以下错误。
The current Flutter SDK version is 1.27.0-2.0.pre.1.
Because flutter_app depends on flutter_html >=2.1.0 which requires Flutter SDK version >=2.2.0, version solving failed.
pub get failed (1; Because flutter_app depends on flutter_html &
如何解决这个问题
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/chewie-0.9.10/lib/src/chewie_player.dar
t:276:17: Error: The method 'inheritFromWidgetOfExactType' isn't defined for the class 'Bu
ildContext'.
- 'BuildContext' is from 'package:flutter/src/widgets/framework
我只是简单地将image_picker:添加到我的受抚养人中,在我完成了酒吧升级之后,我就无法构建这个项目了。我收到以下错误消息:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':flutter_plugin_android_lifecycle'.
> Could not load compiled classes for build file 'C:\flutter\.pub-cache\hosted\pub
我安装了一些软件包,在那个pip失效之后。即使我尝试了一些命令,例如: sudo显示请求程序,我也会得到这个错误。
Traceback (most recent call last):
File "/usr/local/bin/pip", line 7, in <module>
from pip import main
File "/usr/local/lib/python3.5/dist-packages/pip/__init__.py", line 28, in <module>
from pip.vcs im
在Android中(在一个颤振的项目中),我试图让映像程序插件正常工作,但是我一直收到这样的错误:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'imagepicker'.
> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environmen
编译器消息
../../../../Android/flutter_linux_v1.12.13+hotfix.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-1.1.3/lib/src/cached_network_image_provider.dart:42:24:
Error: The method 'CachedNetworkImageProvider.load' has fewer positional arguments than those of overridd
import 'package:flutter/material.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
class PushNotificationService
{
final FirebaseMessaging firebaseMessaging = FirebaseMessaging();
Fut
当我在mac book pro中编译我的项目时,显示以下错误:
Xcode's output:
↳
In file included from /Users/dolphin/.pub-cache/hosted/pub.flutter-io.cn/webview_flutter-0.3.24/ios/Classes/JavaScriptChannelHandler.m:5:
/Users/dolphin/.pub-cache/hosted/pub.flutter-io.cn/webview_flutter-0.3.24/ios/Classes/JavaScriptChannelHandl
我正在尝试运行我的颤振项目,但是我得到了这个错误日志:
/D:/applications/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_platform_interface-5.5.0/lib/src/method_channel/utils/exception.dart:12:7: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
Never conv
当我试图运行一个颤振应用程序时,我一直会收到这个错误:
The current Dart SDK version is 2.10.0.
Because flutter_app depends on path >=1.8.0-nullsafety.3 which requires SDK version >=2.12.0-0 <3.0.0, version solvin
当我尝试启动comment flutter run时,我遇到了这个问题。 我得到的只有这个 lib/MyCart.dart:2:8: Error: Error when reading '../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/adobe_xd-0.1.4/lib/pinned.dart': No such file or directory
import 'package:adobe_xd/pinned.dart';