skip to Main Content

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


  1. Check pubspec.yml file is there in root folder, and main.dart must be in lib folder.

    Login or Signup to reply.
  2. You can delete .idea folder and restart IDE. It will create new folder for you. Also you should check that main.dart is in lib folder and lib 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search