The error looks like this:
E/flutter ( 3378): [ERROR:flutter/runtime/dart_isolate.cc(144)] Could not prepare isolate.
E/flutter ( 3378): [ERROR:flutter/runtime/runtime_controller.cc(422)] Could not create root isolate.
E/flutter ( 3378): [ERROR:flutter/shell/common/shell.cc(609)] Could not launch engine with configuration.
I am getting this error when I use StatefulWidget
and StatelessWidgets
. I don’t get these errors when I write code without using them.
Please help me to fix this error.
2
Answers
The Stackoverflow Thread on "Flutter Could not prepare to run the isolate" might be helpful.
If you are facing the problem that even if you have the main method in
main.dart
inside yourlib
folder, then you could try the following.try flutter clean.