iOS开发Flutter

Flutter 遇到 Exception: ideviceinf

2018-12-20  本文已影响901人  Simple_Dev

Flutter 遇到 Exception: ideviceinfo returned an error: 问题 解决方法

⇒  flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.0.0, on Mac OS X 10.14.2 18C54, locale en-CN)
[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from:
      https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK
      components.
      (or visit https://flutter.io/setup/#android-setup for detailed
      instructions).
      If Android SDK has been installed to a custom location, set $ANDROID_HOME
      to that location.
      You may also want to add it to your PATH environment variable.

⣽Unhandled exception:
Exception: ideviceinfo returned an error:

#0      IMobileDevice.getInfoForDevice (package:flutter_tools/src/ios/mac.dart:141:9)
<asynchronous suspension>
#1      IOSDevice.getAttachedDevices (package:flutter_tools/src/ios/devices.dart:156:55)
<asynchronous suspension>
#2      IOSDevices.pollingGetDevices (package:flutter_tools/src/ios/devices.dart:112:57)
#3      PollingDeviceDiscovery.devices (package:flutter_tools/src/device.dart:166:52)
<asynchronous suspension>
#4      DeviceManager.getAllConnectedDevices (package:flutter_tools/src/device.dart:94:46)
<asynchronous suspension>
#5      DeviceValidator.validate (package:flutter_tools/src/doctor.dart:687:54)
<asynchronous suspension>
#6      Doctor.startValidatorTasks (package:flutter_tools/src/doctor.dart:111:52)
#7      Doctor.diagnose (package:flutter_tools/src/doctor.dart:184:41)
#8      _AsyncAwaitCompleter.start (dart:async/runtime/libasync_patch.dart:49:6)
#9      Doctor.diagnose (package:flutter_tools/src/doctor.dart:174:24)
#10     DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:48:39)
#11     _AsyncAwaitCompleter.start (dart:async/runtime/libasync_patch.dart:49:6)
#12     DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:34:42)
#13     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:401:18)
#14     _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
#15     _rootRunUnary (dart:async/zone.dart:1132:38)
#16     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#17     _FutureListener.handleValue (dart:async/future_impl.dart:129:18)
#18     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:642:45)
#19     Future._propagateToListeners (dart:async/future_impl.dart:671:32)
#20     Future._complete (dart:async/future_impl.dart:476:7)
#21     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#22     _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async/runtime/libasync_patch.dart:33:20)
#23     _rootRun (dart:async/zone.dart:1124:13)
#24     _CustomZone.run (dart:async/zone.dart:1021:19)
#25     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#26     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#27     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#28     _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)
#29     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)

检查你是否安装了Xcode Command Line Tool 工具,没有的话在命令行中执行:xcode-select --install 安装工作。安装之后重启电脑,试试~我就是这么解决滴。
记录下来~

上一篇下一篇

猜你喜欢

热点阅读