ID不存在- Flutter

wvt8vs2t  于 2022-12-05  发布在  Flutter
关注(0)|答案(2)|浏览(167)

当我尝试运行代码时,Flutter应用程序的代码抛出一个警告,指出id不存在。
如何忽略此警告?

======== Exception caught by Flutter framework =====================================================

The following assertion was thrown during a service extension callback for "ext.flutter.inspector.setSelectionById":
Id does not exist.

When the exception was thrown, this was the stack:

dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 251:49  throw_
packages/flutter/src/widgets/widget_inspector.dart 1297:7                     toObject
packages/flutter/src/widgets/widget_inspector.dart 1359:25                    setSelectionById
packages/flutter/src/widgets/widget_inspector.dart 867:35                     <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54            runBody
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 123:5            _async
packages/flutter/src/widgets/widget_inspector.dart 864:38                     <fn>
packages/flutter/src/foundation/binding.dart 602:32                           <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50            <fn>
dart-sdk/lib/async/zone.dart 1687:54                                          runUnary
dart-sdk/lib/async/future_impl.dart 160:18                                    handleValue
dart-sdk/lib/async/future_impl.dart 767:44                                    handleValueCallback
dart-sdk/lib/async/future_impl.dart 796:13                                    _propagateToListeners
dart-sdk/lib/async/future_impl.dart 593:7                                     [_complete]
dart-sdk/lib/async/future.dart 390:15                                         <fn>
dart-sdk/lib/_internal/js_dev_runtime/private/isolate_helper.dart 48:19       internalCallback
====================================================================================================
htrmnn0y

htrmnn0y1#

  • 关闭设备上的应用程序。
  • Shift + F5停止应用程序 * 或 * 仅停止应用程序
  • 重新启动
rqqzpn5f

rqqzpn5f2#

试试这个:

flutter pub global activate devtools
delete .dart_devtool folder
flutter clean
flutter pub get
run app

相关问题