颤振医生:idevice_id返回错误

时间:2018-10-17 02:51:49

标签: flutter

我有一个问题。重新启动计算机后,“ flutter doctor”就可以了。而且我可以成功运行我的应用程序。但是一旦我运行我的应用程序,“ flutter doctor”命令就出错了。如果重新启动计算机,“ flutter doctor”将再次正常。有谁遇到过同样的问题,如何解决 异常:idevice_id返回错误:

#0      IMobileDevice.getInfoForDevice (package:flutter_tools/src/ios/mac.dart:122:9)
#1      IOSDevice.getAttachedDevices (package:flutter_tools/src/ios/devices.dart:152:53)
#2      IOSDevices.pollingGetDevices (package:flutter_tools/src/ios/devices.dart:112:57)
#3      PollingDeviceDiscovery.devices (package:flutter_tools/src/device.dart:163:52)
#4      DeviceManager.getAllConnectedDevices (package:flutter_tools/src/device.dart:91:46)
#5      DeviceValidator.validate (package:flutter_tools/src/doctor.dart:607:54)
#6      Doctor.startValidatorTasks (package:flutter_tools/src/doctor.dart:105:52)
#7      Doctor.diagnose (package:flutter_tools/src/doctor.dart:162:41)
#8      _AsyncAwaitCompleter.start (dart:async/runtime/libasync_patch.dart:49:6)
#9      Doctor.diagnose (package:flutter_tools/src/doctor.dart:152:24)
#10     DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:29:39)
#11     _AsyncAwaitCompleter.start (dart:async/runtime/libasync_patch.dart:49:6)
#12     DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:28:42)
#13     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:372: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)"

2 个答案:

答案 0 :(得分:3)

我可以通过取消设备配对然后运行

来解决问题
brew update
brew uninstall --ignore-dependencies libimobiledevice
brew uninstall --ignore-dependencies usbmuxd
brew install --HEAD usbmuxd
brew unlink usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller

答案 1 :(得分:1)

这是upstream bug in libusbmuxdwill be fixed soon。还有一个proposed workaround被考虑纳入Flutter本身。

与此同时,GitHub用户@mattijsf mentioned可以通过两种方法解决该问题:

  • 通过与USB连接,取消与曾经与Xcode配对的同一本地(Wi-Fi)网络上的所有不需要的iOS设备的配对,然后:打开Xcode> Window> {{1 }}>右键单击设备> Devices & Simulators

  • 如果您使用的是不想与Xcode取消配对的物理iOS设备,则必须使用USB电缆 将其连接或禁用设备上的Wi-Fi

Unpair device