【问题标题】:Id does not exist - Flutter颤振:-尝试运行我的代码时ID不存在
【发布时间】:2022-01-17 04:30:39
【问题描述】:

我有一个颤振的应用程序,当我尝试运行我的代码时,它会抛出警告说 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
====================================================================================================

【问题讨论】:

标签: android ios flutter dart


【解决方案1】:
  • 关闭您设备上的应用。

  • Shift + F5 停止应用程序或只是停止应用程序

  • 重新开始

【讨论】:

    【解决方案2】:

    试试这个。

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

    【讨论】:

      猜你喜欢
      • 2021-12-24
      • 2021-08-04
      • 2022-07-07
      • 2021-08-10
      • 1970-01-01
      • 2020-02-20
      • 1970-01-01
      • 2020-08-13
      • 2022-01-23
      相关资源
      最近更新 更多