使用Firebase实时后不再在iOS或Android中构建
问题
我已经成功使用了Firebase Firestore 在我当前的应用程序中几个月。但是,最近,在尝试Firebase 实时 时,当我尝试在物理或模拟的iPhone或Android上构建时,构建失败了。
我已经尝试了通常的 - 颤动清洁,多个模拟器,重新启动所有内容,相同的错误。
奇怪的是,当使用预先实时版本构建时,错误会持续存在 - 我以前的投入不再工作了!
为了进行理智检查,我创建了一个新的Flutter应用程序,以查看是否有效 - 是的,一个新的干净扑面应用程序可行。
有建议吗?
试图为iPhone构建的错误消息:
Xcode's output:
↳
Writing result bundle at path:
/var/folders/qp/f66_vfps3839pj76pb3d_9fr0000gn/T/flutter_tools.u3vUGq/flutter_ios_build_temp_di
r4QxZbF/temporary_xcresult_bundle
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart:21:38: Error: Type
'FutureOr' not found.
typedef EventHandler<Event, State> = FutureOr<void> Function(
^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_base.dart:23:3: Error:
Type 'FutureOr' not found.
FutureOr<void> close();
^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:108:44:
Error: Type 'StreamTransformerBase' not found.
class _FlatMapStreamTransformer<T> extends StreamTransformerBase<Stream<T>, T> {
^^^^^^^^^^^^^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart:53:28: Error:
Couldn't find constructor 'StreamController'.
final _eventController = StreamController<Event>.broadcast();
^^^^^^^^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart:54:27: Error:
'StreamSubscription' isn't a type.
final _subscriptions = <StreamSubscription<dynamic>>[];
^^^^^^^^^^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_base.dart:61:57: Error:
Couldn't find constructor 'StreamController.broadcast'.
late final _stateController = StreamController<State>.broadcast();
^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:3:24:
Error: Undefined name 'runZoned'.
const _asyncRunZoned = runZoned;
^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/emitter.dart:68:22: Error:
Method not found: 'Completer'.
final _completer = Completer<void>();
^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/emitter.dart:69:25: Error:
'FutureOr' isn't a type.
final _disposables = <FutureOr<void> Function()>[];
^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart:196:48: Error:
Couldn't find constructor 'StreamController.broadcast'.
final controller = StreamController<E>.broadcast(
^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart:269:57: Error: The
method 'cancel' isn't defined for the class 'Object?'.
- 'Object' is from 'dart:core'.
Try correcting the name to the name of an existing method, or defining a method named 'cancel'.
await Future.wait<void>(_subscriptions.map((s) => s.cancel()));
^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:37:40:
Error: Undefined name 'Zone'.
static BlocOverrides? get current => Zone.current[_token] as BlocOverrides?;
^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:103:33:
Error: The argument type '_FlatMapStreamTransformer<dynamic>' can't be assigned to the parameter
type 'StreamTransformer<Stream<dynamic>, dynamic>'.
- '_FlatMapStreamTransformer' is from 'package:bloc/src/bloc.dart'
('../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart').
- 'StreamTransformer' is from 'dart:async'.
- 'Stream' is from 'dart:async'.
.transform<dynamic>(const _FlatMapStreamTransformer<dynamic>());
^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:113:44:
Error: Couldn't find constructor 'StreamController.broadcast'.
final controller = StreamController<T>.broadcast(sync: true);
^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:116:30:
Error: 'StreamSubscription' isn't a type.
final subscriptions = <StreamSubscription<dynamic>>[];
^^^^^^^^^^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:145:28:
Error: The argument type 'List<dynamic>' can't be assigned to the parameter type
'Iterable<Future<dynamic>>'.
- 'List' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'Future' is from 'dart:async'.
return Future.wait(cancels).then((_) {});
^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/emitter.dart:80:23: Error:
The method 'Completer' isn't defined for the class '_Emitter<State>'.
- '_Emitter' is from 'package:bloc/src/bloc.dart'
('../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart').
Try correcting the name to the name of an existing method, or defining a method named
'Completer'.
final completer = Completer<void>();
^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/emitter.dart:88:23: Error:
The argument type 'List<dynamic>' can't be assigned to the parameter type
'Iterable<Future<dynamic>>'.
- 'List' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'Future' is from 'dart:async'.
return Future.any([future, completer.future]).whenComplete(() {
^
Failed to package /Users/stew/Repos/pet_project.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
Result bundle written to path:
/var/folders/qp/f66_vfps3839pj76pb3d_9fr0000gn/T/flutter_tools.u3vUGq/flutter_ios_build_temp_di
r4QxZbF/temporary_xcresult_bundle
Could not build the application for the simulator.
Error launching application on iPhone SE (3rd generation).
试图为Android构建时错误消息:
Launching lib/main_development.dart on Android SDK built for x86 in debug mode...
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart:21:38: Error: Type 'FutureOr' not found.
typedef EventHandler<Event, State> = FutureOr<void> Function(
^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_base.dart:23:3: Error: Type 'FutureOr' not found.
FutureOr<void> close();
^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:108:44: Error: Type 'StreamTransformerBase' not found.
class _FlatMapStreamTransformer<T> extends StreamTransformerBase<Stream<T>, T> {
^^^^^^^^^^^^^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart:53:28: Error: Couldn't find constructor 'StreamController'.
final _eventController = StreamController<Event>.broadcast();
^^^^^^^^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart:54:27: Error: 'StreamSubscription' isn't a type.
final _subscriptions = <StreamSubscription<dynamic>>[];
^^^^^^^^^^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_base.dart:61:57: Error: Couldn't find constructor 'StreamController.broadcast'.
late final _stateController = StreamController<State>.broadcast();
^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:3:24: Error: Undefined name 'runZoned'.
const _asyncRunZoned = runZoned;
^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/emitter.dart:68:22: Error: Method not found: 'Completer'.
final _completer = Completer<void>();
^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/emitter.dart:69:25: Error: 'FutureOr' isn't a type.
final _disposables = <FutureOr<void> Function()>[];
^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart:196:48: Error: Couldn't find constructor 'StreamController.broadcast'.
final controller = StreamController<E>.broadcast(
^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart:269:57: Error: The method 'cancel' isn't defined for the class 'Object?'.
- 'Object' is from 'dart:core'.
Try correcting the name to the name of an existing method, or defining a method named 'cancel'.
await Future.wait<void>(_subscriptions.map((s) => s.cancel()));
^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:37:40: Error: Undefined name 'Zone'.
static BlocOverrides? get current => Zone.current[_token] as BlocOverrides?;
^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:103:33: Error: The argument type '_FlatMapStreamTransformer<dynamic>' can't be assigned to the parameter type 'StreamTransformer<Stream<dynamic>, dynamic>'.
- '_FlatMapStreamTransformer' is from 'package:bloc/src/bloc.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart').
- 'StreamTransformer' is from 'dart:async'.
- 'Stream' is from 'dart:async'.
.transform<dynamic>(const _FlatMapStreamTransformer<dynamic>());
^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:113:44: Error: Couldn't find constructor 'StreamController.broadcast'.
final controller = StreamController<T>.broadcast(sync: true);
^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:116:30: Error: 'StreamSubscription' isn't a type.
final subscriptions = <StreamSubscription<dynamic>>[];
^^^^^^^^^^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:145:28: Error: The argument type 'List<dynamic>' can't be assigned to the parameter type 'Iterable<Future<dynamic>>'.
- 'List' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'Future' is from 'dart:async'.
return Future.wait(cancels).then((_) {});
^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/emitter.dart:80:23: Error: The method 'Completer' isn't defined for the class '_Emitter<State>'.
- '_Emitter' is from 'package:bloc/src/bloc.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart').
Try correcting the name to the name of an existing method, or defining a method named 'Completer'.
final completer = Completer<void>();
^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/emitter.dart:88:23: Error: The argument type 'List<dynamic>' can't be assigned to the parameter type 'Iterable<Future<dynamic>>'.
- 'List' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'Future' is from 'dart:async'.
return Future.any([future, completer.future]).whenComplete(() {
^
FAILURE: Build failed with an exception.
* Where:
Script '/Users/stew/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1156
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDevelopmentDebug'.
> Process 'command '/Users/stew/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 17s
Running Gradle task 'assembleDevelopmentDebug'... 19.2s
Exception: Gradle task assembleDevelopmentDebug failed with exit code 1
Problem
I have been successfully using firebase firestore in my current app for months. However, recently when experimenting with firebase realtime, when I attempt to build on either physical or emulated iphone or android, the build fails.
I've tried usual - flutter clean, multiple emulators, reboot everything, same errors.
Strangely, when building with a pre-realtime version, the errors persist - none of my previous commits work anymore!
For sanity check, I created a new flutter application to see if anything was working - yes, a new clean flutter app works.
Any advice?
Error message when trying to build for iPhone:
Xcode's output:
↳
Writing result bundle at path:
/var/folders/qp/f66_vfps3839pj76pb3d_9fr0000gn/T/flutter_tools.u3vUGq/flutter_ios_build_temp_di
r4QxZbF/temporary_xcresult_bundle
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart:21:38: Error: Type
'FutureOr' not found.
typedef EventHandler<Event, State> = FutureOr<void> Function(
^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_base.dart:23:3: Error:
Type 'FutureOr' not found.
FutureOr<void> close();
^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:108:44:
Error: Type 'StreamTransformerBase' not found.
class _FlatMapStreamTransformer<T> extends StreamTransformerBase<Stream<T>, T> {
^^^^^^^^^^^^^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart:53:28: Error:
Couldn't find constructor 'StreamController'.
final _eventController = StreamController<Event>.broadcast();
^^^^^^^^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart:54:27: Error:
'StreamSubscription' isn't a type.
final _subscriptions = <StreamSubscription<dynamic>>[];
^^^^^^^^^^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_base.dart:61:57: Error:
Couldn't find constructor 'StreamController.broadcast'.
late final _stateController = StreamController<State>.broadcast();
^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:3:24:
Error: Undefined name 'runZoned'.
const _asyncRunZoned = runZoned;
^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/emitter.dart:68:22: Error:
Method not found: 'Completer'.
final _completer = Completer<void>();
^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/emitter.dart:69:25: Error:
'FutureOr' isn't a type.
final _disposables = <FutureOr<void> Function()>[];
^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart:196:48: Error:
Couldn't find constructor 'StreamController.broadcast'.
final controller = StreamController<E>.broadcast(
^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart:269:57: Error: The
method 'cancel' isn't defined for the class 'Object?'.
- 'Object' is from 'dart:core'.
Try correcting the name to the name of an existing method, or defining a method named 'cancel'.
await Future.wait<void>(_subscriptions.map((s) => s.cancel()));
^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:37:40:
Error: Undefined name 'Zone'.
static BlocOverrides? get current => Zone.current[_token] as BlocOverrides?;
^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:103:33:
Error: The argument type '_FlatMapStreamTransformer<dynamic>' can't be assigned to the parameter
type 'StreamTransformer<Stream<dynamic>, dynamic>'.
- '_FlatMapStreamTransformer' is from 'package:bloc/src/bloc.dart'
('../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart').
- 'StreamTransformer' is from 'dart:async'.
- 'Stream' is from 'dart:async'.
.transform<dynamic>(const _FlatMapStreamTransformer<dynamic>());
^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:113:44:
Error: Couldn't find constructor 'StreamController.broadcast'.
final controller = StreamController<T>.broadcast(sync: true);
^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:116:30:
Error: 'StreamSubscription' isn't a type.
final subscriptions = <StreamSubscription<dynamic>>[];
^^^^^^^^^^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:145:28:
Error: The argument type 'List<dynamic>' can't be assigned to the parameter type
'Iterable<Future<dynamic>>'.
- 'List' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'Future' is from 'dart:async'.
return Future.wait(cancels).then((_) {});
^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/emitter.dart:80:23: Error:
The method 'Completer' isn't defined for the class '_Emitter<State>'.
- '_Emitter' is from 'package:bloc/src/bloc.dart'
('../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart').
Try correcting the name to the name of an existing method, or defining a method named
'Completer'.
final completer = Completer<void>();
^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/emitter.dart:88:23: Error:
The argument type 'List<dynamic>' can't be assigned to the parameter type
'Iterable<Future<dynamic>>'.
- 'List' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'Future' is from 'dart:async'.
return Future.any([future, completer.future]).whenComplete(() {
^
Failed to package /Users/stew/Repos/pet_project.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
Result bundle written to path:
/var/folders/qp/f66_vfps3839pj76pb3d_9fr0000gn/T/flutter_tools.u3vUGq/flutter_ios_build_temp_di
r4QxZbF/temporary_xcresult_bundle
Could not build the application for the simulator.
Error launching application on iPhone SE (3rd generation).
Error message when trying to build for Android:
Launching lib/main_development.dart on Android SDK built for x86 in debug mode...
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart:21:38: Error: Type 'FutureOr' not found.
typedef EventHandler<Event, State> = FutureOr<void> Function(
^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_base.dart:23:3: Error: Type 'FutureOr' not found.
FutureOr<void> close();
^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:108:44: Error: Type 'StreamTransformerBase' not found.
class _FlatMapStreamTransformer<T> extends StreamTransformerBase<Stream<T>, T> {
^^^^^^^^^^^^^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart:53:28: Error: Couldn't find constructor 'StreamController'.
final _eventController = StreamController<Event>.broadcast();
^^^^^^^^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart:54:27: Error: 'StreamSubscription' isn't a type.
final _subscriptions = <StreamSubscription<dynamic>>[];
^^^^^^^^^^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_base.dart:61:57: Error: Couldn't find constructor 'StreamController.broadcast'.
late final _stateController = StreamController<State>.broadcast();
^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:3:24: Error: Undefined name 'runZoned'.
const _asyncRunZoned = runZoned;
^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/emitter.dart:68:22: Error: Method not found: 'Completer'.
final _completer = Completer<void>();
^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/emitter.dart:69:25: Error: 'FutureOr' isn't a type.
final _disposables = <FutureOr<void> Function()>[];
^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart:196:48: Error: Couldn't find constructor 'StreamController.broadcast'.
final controller = StreamController<E>.broadcast(
^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart:269:57: Error: The method 'cancel' isn't defined for the class 'Object?'.
- 'Object' is from 'dart:core'.
Try correcting the name to the name of an existing method, or defining a method named 'cancel'.
await Future.wait<void>(_subscriptions.map((s) => s.cancel()));
^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:37:40: Error: Undefined name 'Zone'.
static BlocOverrides? get current => Zone.current[_token] as BlocOverrides?;
^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:103:33: Error: The argument type '_FlatMapStreamTransformer<dynamic>' can't be assigned to the parameter type 'StreamTransformer<Stream<dynamic>, dynamic>'.
- '_FlatMapStreamTransformer' is from 'package:bloc/src/bloc.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart').
- 'StreamTransformer' is from 'dart:async'.
- 'Stream' is from 'dart:async'.
.transform<dynamic>(const _FlatMapStreamTransformer<dynamic>());
^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:113:44: Error: Couldn't find constructor 'StreamController.broadcast'.
final controller = StreamController<T>.broadcast(sync: true);
^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:116:30: Error: 'StreamSubscription' isn't a type.
final subscriptions = <StreamSubscription<dynamic>>[];
^^^^^^^^^^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc_overrides.dart:145:28: Error: The argument type 'List<dynamic>' can't be assigned to the parameter type 'Iterable<Future<dynamic>>'.
- 'List' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'Future' is from 'dart:async'.
return Future.wait(cancels).then((_) {});
^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/emitter.dart:80:23: Error: The method 'Completer' isn't defined for the class '_Emitter<State>'.
- '_Emitter' is from 'package:bloc/src/bloc.dart' ('../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/bloc.dart').
Try correcting the name to the name of an existing method, or defining a method named 'Completer'.
final completer = Completer<void>();
^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/bloc-8.0.3/lib/src/emitter.dart:88:23: Error: The argument type 'List<dynamic>' can't be assigned to the parameter type 'Iterable<Future<dynamic>>'.
- 'List' is from 'dart:core'.
- 'Iterable' is from 'dart:core'.
- 'Future' is from 'dart:async'.
return Future.any([future, completer.future]).whenComplete(() {
^
FAILURE: Build failed with an exception.
* Where:
Script '/Users/stew/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1156
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDevelopmentDebug'.
> Process 'command '/Users/stew/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 17s
Running Gradle task 'assembleDevelopmentDebug'... 19.2s
Exception: Gradle task assembleDevelopmentDebug failed with exit code 1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在这里找到了答案:更新/.pub-cache中的更新颤音依赖关系
I found the answer here: Update flutter dependencies in /.pub-cache