我使用的是颤振版本1.25 (测试版),它工作得很好。在升级到2.0.0版本并切换到稳定的频道后,当我尝试在移动或网络上运行该应用程序时,我会收到这个错误。
../../../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/provider-3.2.0/lib/src/delegate_widget.dart:194:18: Error: Superclass has no method named 'inheritFromElement'.
return super.inheritFromElement(ancest
我运行我的颤振应用程序(颤振3.0和飞镖SDK2.17.0。
但现在我发现了一个警告,就像这样-
/usr/local/Caskroom/flutter/2.0.2/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.
6.1/lib/get_navigation/src/router_report.dart:53:22: Warning: Operand of null-aware
operation '!' has type 'WidgetsBinding' which excludes null.
-
大约两个月前,我已经构建了一个应用程序,它工作得很好,并在approved和Play Store上获得了批准。
这些天来,我正试图为应用程序添加新功能,但出于某种原因,Flutter未能在iOS模拟器和安卓模拟器上运行该应用程序。
我收到这些错误消息:
Android
Launching lib/main.dart on sdk gphone x86 arm in debug mode...
lib/main.dart:1
../../../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/extended_image-
切换到分支“稳定”颤动通道后
以下是构建问题。
错误:指定的语言版本太高。支持的最高语言版本为2.8。
output: ../../third_party/dart/third_party/pkg/collection/lib/src/utils.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.8.
// Copyright (c) 2014, the Dart project authors. Please see the AUTH
我得到了这些错误,不知道如何修复它们。
../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/flutter_platform_widgets-1.20.0/lib/src/platform_button.dart:269:14: Error: The method 'FlatButton' isn't defined for the class 'PlatformButton'.
- 'PlatformButton' is from 'package:flutter_platfo
当我从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从2.5升级到2.8,当我运行该应用程序时,我得到以下错误:
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/inspireui-1.0.9/lib/icons/material.dart:5943:25: Error: Member not found: 'six_ft_apart&
所以我试着在终端上运行这个命令
flutter pub run intl_translation:extract_to_arb --output-dir=lib/i18n lib/i18n/app_localization.dart
我得到了这个错误
Dart 2.15.1 is incompatible with your dependencies' SDK constraints. Please run "flutter pub get" again.
pub finished with exit code 65
我注意到使用的Dart版本是2.15.1,而不是在A
我刚刚将自己的颤音升级到最新版本(3.0.0),我的项目一直给我以下警告和错误:
../../../../flutter/.pub-cache/hosted/pub.dartlang.org/syncfusion_flutter_pdfviewer-20.1.55-beta/lib/src/control/pdf_page_view.dart:196:23: Warning: Operand of null-aware operation '?.' has type 'PaintingBinding' which excludes null.
- 'P
我刚刚开始学习AWS Amplify,并按照中给出的步骤操作 https://docs.amplify.aws/start/getting-started/setup/q/integration/flutter#create-a-new-flutter-application 然后我在这个问题中遇到了一个错误The method 'Amplify' isn't defined for the type '_MyAppState'. -FlutterAmplify 然后我就照它说的做了,然后又有一个新的错误 Amplify()表达式不会计算函数的值,因此
我有一个flutter应用程序,我正试图从中为IOS生成版本,但我面临着这个错误:
sent 29 bytes received 20 bytes 98.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files could not be transferred (code 23) at /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-54.120.1/rsync/main.c(996) [se
我试图迁移dart安全,但是在运行dart migrate时我得到了以下错误
Bad state: Error: package has unmigrated dependencies.
Before migrating your package, we recommend ensuring that every library it
imports (either directly or indirectly) has been migrated to null safety, so
that you will be able to run your unit tests in sound
我正在为Dart库布局而苦苦挣扎。我尝试了以下几种方法
lib/
A.dart
B.dart
my_lib.dart
位置: A.dart
class A {
B myB;
}
B.dart
class A {
B myB;
}
my_lib.dart
#library('my_lib');
#source('A.dart');
#source('B.dart');
但在A.dart中,在Dart编辑器中有一个问题:B-没有这样的类型。如果我在文件中导入B.dart,则通过
#import('B.dar
我在测试频道,并试图应用flutter doctor,但在它试图升级颤振之后,我得到了以下错误。我删除了缓存文件夹,并再次尝试它,但它没有工作。即使我尝试flutter channel stable,我也会得到相同的错误。
> Downloading Dart SDK from Flutter engine
> 641a7a3d8e59c2fbe18a79ab844d4a017ab6560e... % Total % Received %
> Xferd Average Speed Time Time Time Current
>
当我运行我的code.Please时,我会发现这些错误我升级了那个颤音,和publicspeck.lock,我提到代码很旧,我试着升级
lib/screens/search/createnewfood.dart:147:30: Error: The argument type 'void Function(String)' can't be assigned to the parameter type 'void Function(String?)?' because 'String?' is nullable and 'Stri
我跑不了这个颤音,请帮帮我。我是新来的。要了解问题所在,请从下面的链接克隆此项目,并尝试在android或web上运行该项目。Gthub链接:
调试控制台输出
Launching lib/main.dart on Chrome in debug mode...
: Warning: Operand of null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
- 'WidgetsBinding' is from 'package:flutt
我正在使用最新的Android Studio。它有编译错误,不知道我怎么得到它??
D:\path\of\project>flutter build apk
Building without sound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety
Running Gradle task 'assembleRelease'...
lib/ui/screens/splash_screen.dart:52:20: Error: The getter
我已经有两个小时没能修正错误了。也许你们中的一个能帮我。你可以在下面找到一张照片。
Debug控制台还告诉我:
[ The following NoSuchMethodError was thrown building MyApp (dirty, state: _MyAppState#c7f7e):
I/flutter (17681): The method 'map' was called on null.
I/flutter (17681): Receiver: null
I/flutter (17681): Tried calling: map<Answer>
我有一个古老的颤栗计划。其中有一个错误part 'Target of URI hasn't been generated: 'MoorDatabase.g.dart'.Try running the generator that will generate the file referenced by the URI.。所以我使用了这个命令flutter pub run build_runner build。但是它向我展示了这个错误Bad state: Unexpected diagnostics: C:\flutter\bin\cache\dart-sdk\l
我正在进行一个颤振项目,试图构建一个apk,这给了我一个错误。
下面是我尝试运行应用程序时得到的错误代码
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/chewie-0.9.10/lib/src/chewie_player.dart:83:7: Error: No named parameter with the name 'resizeToAvoidBottomPadding'.
resizeToAvoidBottomPadding: false,
^^^^^^^^^^^^^^^^^^^^^^^^^^
/C:/s
我刚刚更新到flutter版本1.25.0-5.0.pre.92,我在我的代码中得到了许多空安全相关的错误,以前工作得很好。我没有以任何方式选择零安全,我所做的一切都是运行flutter升级,现在它假设我想使用零安全。
以下是错误:
org-dartlang-app:/pages/lightweight_table/page_lightweight_table.dart:165:81: Error: The parameter 'rowKeys' can't have a value of 'null' because of its type '
我在我的颤振应用程序中使用了shared_preferences插件。从一开始(可能在颤振升级之后),它就开始抛出一个异常:
E/flutter (27778): [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
E/flutter (27778): type '_InternalLinkedHashMap' is not a subtype of type 'Map<String, Object>' where
E/flutter (27778): _I
我想使用mongo来存储我的应用程序数据,但是当我尝试await db.open()时,这个错误会出现在控制台上:
[ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
E/flutter (11408): type 'Future<dynamic>' is not a subtype of type 'Future<bool>' where
E/flutter (11408): Future is from dart:async
E/flutte
当升级到颤振3.0.0时,在运行应用程序时会出现一个问题,
(应用程序可以工作,但终端中有错误/s(警告/s))。
这似乎是一个有约束力的问题。
错误(警告)是:警告:空感知操作的操作数'!‘有'WidgetsBinding‘类型,它排除null。
: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
../…/src/keyboard_visibility.dart:21
- 'WidgetsBindin
我一直试图克隆和运行这一次-信使应用程序从GitHub。但我一直在犯这个错误。我尝试了flutter doctor、flutter clean、flutter build apk (这也给出了一个错误)、flutter pub cache repair、flutter pub get等等,但是没有成功。
这是我正在犯的错误:
punreachrany@Punreachs-MacBook-Pro timy-messenger-master % flutter run
Using hardware rendering with device sdk gphone x86 arm. If you g