昨晚,我不小心将Dart编辑器和SDK版本从1.60升级到1.72。意外地意味着我在开发过程中不想改变我的开发环境,但它确实发生了。在那之后,当我尝试“pub get”时,我看到了这一点:
>--- 7:48:46 AM Running pub get on /Users/Clayvessel/Dropbox/PROJECT/DART/DART_Project/OneViewer_Composite-Viewer/OneViewer_6 ... ---
>Resolving dependencies...
>Got dependencies!
>Precompiling executables...
>Loading source assets...
>Failed to precompile intl:extract_to_arb:
>Unhandled exception:
>Uncaught Error: Failure getting http://localhost:51271/packages/intl/extract_messages.dart: 404 Not Found
>Stack Trace:
>#0 _asyncLoadError (dart:_builtin:285)
>#1 _httpGet.<anonymous closure>.<anonymous closure> (dart:_builtin:228)
>#2 _RootZone.runGuarded (dart:async/zone.dart:1078)
>#3 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:390)
>#4 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399)
>#5 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:290)
>#6 _ForwardingStream._handleDone (dart:async/stream_pipe.dart:110)
>#7 _handleDone (dart:async/stream_pipe.dart:178)
>#8 _RootZone.runGuarded (dart:async/zone.dart:1078)
>#9 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:390)
>#10 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399)
>#11 _DelayedDone.perform (dart:async/stream_impl.dart:614)
>#12 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:711)
>#13 _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:671)
>#14 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
>#15 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
>#16 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
>#17 _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)
>Failed to precompile intl:generate_from_arb:
>Unhandled exception:
>Uncaught Error: Failure getting http://localhost:51271/packages/intl/extract_messages.dart: 404 Not Found
>Stack Trace:
>#0 _asyncLoadError (dart:_builtin:285)
>#1 _httpGet.<anonymous closure>.<anonymous closure> (dart:_builtin:228)
>#2 _RootZone.runGuarded (dart:async/zone.dart:1078)
>#3 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:390)
>#4 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399)
>#5 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:290)
>#6 _ForwardingStream._handleDone (dart:async/stream_pipe.dart:110)
>#7 _handleDone (dart:async/stream_pipe.dart:178)
>#8 _RootZone.runGuarded (dart:async/zone.dart:1078)
>#9 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:390)
>#10 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399)
>#11 _DelayedDone.perform (dart:async/stream_impl.dart:614)
>#12 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:711)
>#13 _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:671)
>#14 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
>#15 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
>#16 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
>#17 _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)
特别是它抱怨这两件事:
import'package:chart / chart.dart'
导入'package:chrome / chrome_app.dart'作为chrome
在我更新Dart SDK之前,他们工作正常。在Dart编辑器中,它抱怨: URI的目标不存在
作为Dart的新手,我做了详尽的搜索,但没有运气。截止日期即将到来,我焦急地寻找解决方案。我在Mac Book上开发。但我也有一台Windows 7笔记本电脑。他们正在共享Dropbox配备的项目文件夹。昨天在此错误发生之前,我将OS X更新为Yosemite。当机器正在更新时,我试图在Windows 7笔记本中为我的项目发布和编译dart2js。它产生了一些错误。所以我删除了我的整个Dart文件夹,现在从Mac Book再次下载它。我意识到现在dart已经更新到1.7.2。
对此的任何帮助将不胜感激!
答案 0 :(得分:6)
在命令行上,运行&#34; pub cache repair&#34;可能有帮助。我更新时经常要这样做。