最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

flutter - How to know which files import a library in Dart? - Stack Overflow

programmeradmin1浏览0评论

I accidently imported dart:mirrors through auto completion.

Now the app is not running with a very not helpful error.

✓ Built build/app/outputs/flutter-apk/app-dev-debug.apk
Installing build/app/outputs/flutter-apk/app-dev-debug.apk...
E/flutter (15723): [ERROR:flutter/shell/common/shell(117)] Dart Error: error: import of dart:mirrors is not supported in the current Dart runtime
E/flutter (15723): [ERROR:flutter/runtime/dart_isolate(147)] Could not prepare isolate.
E/flutter (15723): [ERROR:flutter/runtime/runtime_controller(549)] Could not create root isolate.
E/flutter (15723): [ERROR:flutter/shell/common/shell(690)] Could not launch engine with configuration.

It does NOT tell me which files imports it.

I have thousands of files in my large projects. I could check the Git Logs but this also require check every lines of imports in recent commits.

Is there a way to make Dart tell me where is that import occuring ?

发布评论

评论列表(0)

  1. 暂无评论