Flutter Could not prepare to run the isolate Flutter Could not prepare to run the isolate dart dart

Flutter Could not prepare to run the isolate


I had the same error and it happened when I didn't write the main method.so do this

void main() => runApp(MyApp());

MyApp is my main class


If you are facing the problem even if you have main method in main.dart inside your lib folder

Try

flutter clean

And then

flutter run

Worked for me :)


I have the same error. I tried many ways and this is the right way.

You need to run

flutter build ios --debug (or --profile or --release)

before you launch the project in Xcode.