admin管理员组

文章数量:1321063

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 ?

本文标签: flutterHow to know which files import a library in DartStack Overflow