简体   繁体   中英

flutter doctor after install

I'm following the setup guide here and after I unzip flutter and run flutter doctor I get the following error

flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.0.0, on Mac OS X 10.14.2 18C54, locale en-US)
⣾Unhandled exception:
RangeError (index): Invalid value: Only valid value is 0: 1
#0      List.[] (dart:core/runtime/libgrowable_array.dart:145:60)
#1      IntelliJValidatorOnMac.pluginsPath (package:flutter_tools/src/doctor.dart:666:31)
#2      IntelliJValidator.validate (package:flutter_tools/src/doctor.dart:509:53)
<asynchronous suspension>
#3      Doctor.startValidatorTasks (package:flutter_tools/src/doctor.dart:112:52)
#4      Doctor.diagnose (package:flutter_tools/src/doctor.dart:185:41)
#5      _AsyncAwaitCompleter.start (dart:async/runtime/libasync_patch.dart:49:6)
#6      Doctor.diagnose (package:flutter_tools/src/doctor.dart:175:24)
#7      DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:48:39)
#8      _AsyncAwaitCompleter.start (dart:async/runtime/libasync_patch.dart:49:6)
#9      DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:34:42)
#10     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:526:18)
#11     _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
#12     _rootRunUnary (dart:async/zone.dart:1132:38)
#13     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#14     _FutureListener.handleValue (dart:async/future_impl.dart:129:18)
#15     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:642:45)
#16     Future._propagateToListeners (dart:async/future_impl.dart:671:32)
#17     Future._complete (dart:async/future_impl.dart:476:7)
#18     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#19     _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async/runtime/libasync_patch.dart:33:20)
#20     _rootRun (dart:async/zone.dart:1124:13)
#21     _CustomZone.run (dart:async/zone.dart:1021:19)
#22     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#23     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#24     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#25     _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)
#26     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)

I've tried installing flutter from git, trying different channels, setting my path, downloading dart, downloading flutter/dart for android studio and I can not get past this error.

我不知道是什么原因引起的,但是重新安装Git和sdk可能会解决问题。

The error is being caused due to dart. Try the following steps:

1) Running flutter packages get in your terminal would be a good idea

2) Run flutter upgrade in your terminal

3) Check if dart is installed by running dart --version

4) Check if you have brew by running which brew

5) Also check the if you're on the dev channel or not, some people experience issues on dev channel. If you are, I'd suggest switching to master.

In case you don't have dart installed, I'd suggest installing dart. Hope this helps. Do let us know if something works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM