'Flutter "Entrypoint isn't within the current project." error on Android Studio
Flutter app runs on VS Code with Start Debugging & Run Without Debugging and also with terminal command "flutter run" . However it runs on Android Stuido only with terminal command "flutter run".
When I try to run it on Android Studio, with the play button which triggers the build, I get this error : "Entrypoint isn't within the current project."
Invalidate Caches and Restart, flutter clean, quitting and restarting Android Studio are some options I tired with no success at all.
Have any of you faced the same issue? What can be the problem? And please the solution...
Thanks in advance, Oz
Solution 1:[1]
Click on File-> Project Structure -> Module then add root folder of your project then it will detect its a flutter app and then build
Solution 2:[2]
It works for me, hope it will work for everyone.
Goto File -> Project Structure -> Module
Or
in edit configuration, just name it "main" and locate the location of 'main.dart' file in the Dart entrypoint text field.
Please take a look at the below screenshot.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ashok |
| Solution 2 |

