Apple Fehler
beim Bauen auf mein iPhone 6s kam das in Xcode
2019-11-14 21:09:58.325415+0100 Runner[5804:6318212] Metal API Validation Enabled
2019-11-14 21:09:58.504816+0100 Runner[5804:6318236] flutter: Observatory listening on http://127.0.0.1:50719/hxvwvsh3uyE=/
2019-11-14 21:09:58.804750+0100 Runner[5804:6318229] [VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized.
If you're running an application and need to access the binary messenger before `runApp()` has been called (for example, during plugin initialization), then you need to explicitly call the `WidgetsFlutterBinding.ensureInitialized()` first.
If you're running a test, you can call the `TestWidgetsFlutterBinding.ensureInitialized()` as the first line in your test's `main()` method to initialize the binding.
#0 defaultBinaryMessenger.<anonymous closure> (package:flutter/src/services/binary_messenger.dart:73:7)
#1 defaultBinaryMessenger (package:flutter/src/services/binary_messenger.dart:86:4)
#2 MethodChannel.binaryMessenger (package:flutter/src/services/platform_channel.dart:140:62)
#3 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:314:35)
<asynchronous suspension>
#4 OptionalMethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:429:36)
<asynchronous suspension>
#5 SystemChrome.setPreferredOrientations (package:flutter/src/services/system_chrome.dart:225:35)
<asynchronous suspension>
#6 main (package:tc_frontend/main.dart:26:22)
<asynchronous suspension>
#7 _runMainZoned.<anonymous closure>.<anonymous closure> (dart:ui/hooks.dart:239:25)
#8 _rootRun (dart:async/zone.dart:1124:13)
#9 _CustomZone.run (dart:async/zone.dart:1021:19)
#10 _runZoned (dart:async/zone.dart:1516:10)
#11 runZoned (dart:async/zone.dart:1500:12)
#12 _runMainZoned.<anonymous closure> (dart:ui/hooks.dart:231:5)
#13 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:305:19)
#14 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)
2019-11-14 21:09:59.021894+0100 Runner[5804:6318229] flutter: Overflow on channel: flutter/lifecycle. Messages on this channel are being discarded in FIFO fashion. The engine may not be running or you need to adjust the buffer size if of the channel.
2019-11-14 21:09:59.024425+0100 Runner[5804:6318229] flutter: Overflow on channel: flutter/lifecycle. Messages on this channel are being discarded in FIFO fashion. The engine may not be running or you need to adjust the buffer size if of the channel.
Die Lösung steht in der Fehlermeldung. In der Main-Methode muss "WidgetsFlutterBinding.ensureInitial()" vor "runapp()" eingefügt werden.
Neuer Fehler: Built /Users/marwinl/AndroidStudioProjects/tc-frontend/build/ios/iphoneos/tinyCampus.app. marwinl@pool-10-192-255-74 tc-frontend % flutter install Installing de.tinycampus.tcfrontend to iPhone... Process exited abnormally: dyld: Library not loaded: /b/s/w/ir/k/homebrew/opt/libzip-flutter/lib/libzip.5.dylib Referenced from: /Users/marwinl/SDKs/flutter/bin/cache/artifacts/ideviceinstaller/ideviceinstaller Reason: image not found Install failed marwinl@pool-10-192-255-74 tc-frontend %
Edited by Robert Palm