I have been working on my project for several days, everything was ok. But now i get the error "error running main.dart. Entryoint isnt within a Flutter pub root". Please help mee
I tried renaming the .idea folder, but nothing changed
I have been working on my project for several days, everything was ok. But now i get the error "error running main.dart. Entryoint isnt within a Flutter pub root". Please help mee
I tried renaming the .idea folder, but nothing changed
2
Answers
Check pubspec.yml file is there in root folder, and main.dart must be in lib folder.
You can delete
.idea
folder and restart IDE. It will create new folder for you. Also you should check thatmain.dart
is inlib
folder andlib
is in the root of your project. This problem occurred definitely because of misleading if folders structure. And you should double check it. As an option you could try to reinstalling the Flutter SDK.