Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter project opening in Android Studio with just the Android module

My project structure only consists of the Android module, and doesn't show the ios and lib directory. Besides, why is the Android directory treated as a module rather than just a directory? It also has its own iml file named project_name_android.iml. I'm not able to run the project because AS complains that the entry point (main.dart) is missing. When I check in the folder, it's actually there, but it won't show on AS.

Here's a screenshot: enter image description here

like image 809
stack Avatar asked Nov 07 '22 00:11

stack


1 Answers

I solved this problem on Android Studio OSX, this is my steps :

  • Android studio -> File -> Project Structure
  • On project setting dialog -> see menu -> choose Module
  • Choose your project -> click <+ Add content root>
  • Choose your root flutter project folder -> OK to finish
  • everything comes back to you

Hope this help

like image 200
VO DUC HUY Avatar answered Nov 14 '22 21:11

VO DUC HUY