Flutter init -o my_appResolving dependencIEs...Error on line 17,column 16 of pubspec.yaml: InvalID version constraint: Could not parse version "^1.4.0". UnkNown text at "^1.4.0". stack_trace: ^1.4.0 ^^^^^^Unhandled exception:Uncaught Error: filesystemexception: Cannot open file,path = '/Users/craig/Code/Flutter/packages/Flutter_tools/packages/sky_tools/executable.dart' (OS Error: No such file or directory,errno = 2)Stack Trace:#0 _file.open.<anonymous closure> (dart:io/file_impl.dart:349)#1 _RootZone.runUnary (dart:async/zone.dart:1151)#2 _Future._propagatetoListeners.handleValueCallback (dart:async/future_impl.dart:496)#3 _Future._propagatetoListeners (dart:async/future_impl.dart:579)#4 _Future._completeWithValue (dart:async/future_impl.dart:339)#5 _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:401)#6 _asyncruncallbackLoop (dart:async/schedule_microtask.dart:41)#7 _asyncruncallback (dart:async/schedule_microtask.dart:48)#8 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)#9 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:131)#0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:883)#1 _asyncruncallbackLoop (dart:async/schedule_microtask.dart:41)#2 _asyncruncallback (dart:async/schedule_microtask.dart:48)#3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:131)Unhandled exception:Uncaught Error: filesystemexception: Cannot open file,path = '/Users/craig/Code/Flutter/bin/cache/Flutter_tools.snapshot' (OS Error: No such file or directory,errno = 2)Stack Trace:#0 _file.open.<anonymous closure> (dart:io/file_impl.dart:349)#1 _RootZone.runUnary (dart:async/zone.dart:1151)#2 _Future._propagatetoListeners.handleValueCallback (dart:async/future_impl.dart:496)#3 _Future._propagatetoListeners (dart:async/future_impl.dart:579)#4 _Future._completeWithValue (dart:async/future_impl.dart:339)#5 _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:401)#6 _asyncruncallbackLoop (dart:async/schedule_microtask.dart:41)#7 _asyncruncallback (dart:async/schedule_microtask.dart:48)#8 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)#9 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:131)#0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:883)#1 _asyncruncallbackLoop (dart:async/schedule_microtask.dart:41)#2 _asyncruncallback (dart:async/schedule_microtask.dart:48)#3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:131)解决方法 看起来您的Dart版本已过时< 1.9.2.
尝试使用dart –version获取已安装的Dart SDK的版本.
当前是1.12.x.
更新2018-03-20
在迁移阶段到Dart 2期间,您可能希望从开发通道安装Dart以获得2.0.0-Alpha.x版本.
最新的稳定版本是1.24.x
例如
brew install dart --devel
更新2018-06-21
现在也支持:
brew install dart@2总结
以上是内存溢出为你收集整理的dart – Flutter在`flutter`命令失败全部内容,希望文章能够帮你解决dart – Flutter在`flutter`命令失败所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)