flutter.io“NoSuchMethodError:在null上调用了getter'ameMacOS'。”

时间:2018-03-31 17:57:45

标签: dart flutter

我一直想和flutter.io玩一会儿,今天就开始安装吧。我正在关注flutter网站上的“入门”页面,但是在运行“flutter doctor”时遇到以下错误消息...我有什么问题吗?或者解决这个问题的解决方法?

Oops; flutter has exited unexpectedly.
Sending crash report to Google.
Crash report sent (report ID: 8a4b9d16bec30469)
Unhandled exception:
NoSuchMethodError: The getter 'isMacOS' was called on null.
Receiver: null
Tried calling: isMacOS
#0      Object.noSuchMethod (dart:core-patch/dart:core/object_patch.dart:46)
#1      IOSDevices.supportsPlatform (package:flutter_tools/src/ios/devices.dart:34)
#2      DeviceManager._platformDiscoverers.<anonymous closure> (package:flutter_tools/src/device.dart:85)
#3      WhereIterator.moveNext (dart:_internal/iterable.dart:439)
#4      DeviceManager.getAllConnectedDevices (package:flutter_tools/src/device.dart:90)
<asynchronous suspension>
#5      DeviceValidator.validate (package:flutter_tools/src/doctor.dart:560)
<asynchronous suspension>
#6      Doctor.startValidatorTasks (package:flutter_tools/src/doctor.dart:71)
#7      Doctor.diagnose (package:flutter_tools/src/doctor.dart:128)
<asynchronous suspension>
#8      _doctorText.<anonymous closure> (package:flutter_tools/runner.dart:237)
#9      AppContext._run (package:flutter_tools/src/base/context.dart:76)
<asynchronous suspension>
#10     AppContext.runInZone.<anonymous closure> (package:flutter_tools/src/base/context.dart:66)
#11     _rootRun (dart:async/zone.dart:1126)
#12     _CustomZone.run (dart:async/zone.dart:1023)
#13     runZoned (dart:async/zone.dart:1501)
#14     AppContext.runInZone (package:flutter_tools/src/base/context.dart:65)
#15     _doctorText (package:flutter_tools/runner.dart:237)
<asynchronous suspension>
#16     _createLocalCrashReport (package:flutter_tools/runner.dart:212)
<asynchronous suspension>
#17     _handleToolError (package:flutter_tools/runner.dart:167)
<asynchronous suspension>
#18     run.<anonymous closure> (package:flutter_tools/runner.dart:94)
<asynchronous suspension>
#19     AppContext._run (package:flutter_tools/src/base/context.dart:76)
<asynchronous suspension>
#20     AppContext.runInZone.<anonymous closure> (package:flutter_tools/src/base/context.dart:66)
#21     _rootRun (dart:async/zone.dart:1126)
#22     _CustomZone.run (dart:async/zone.dart:1023)
#23     runZoned (dart:async/zone.dart:1501)
#24     AppContext.runInZone (package:flutter_tools/src/base/context.dart:65)
#25     run (package:flutter_tools/runner.dart:61)
<asynchronous suspension>
#26     main (package:flutter_tools/executable.dart:48)
<asynchronous suspension>

我在github上注意到了这个问题:https://github.com/flutter/flutter/issues/16096所以我认为这是一个错误?我可以做些什么来解决它,所以我可以尝试扑腾?

感谢您的帮助!

编辑:我在Windows 10上运行此操作,如果这与错误有关。

1 个答案:

答案 0 :(得分:1)

尝试 flutter upgrade ,然后 颤动医生