skip to Main Content

Whenever I create the Create new Flutter Project in android studio,
It’s always throwing out this error: Please help.

Could not find a file named "pubspec.yaml" in "/Users/<usrname>/AndroidStudioProjects/inventory_system". pub get failed (66; Could not find a file named "pubspec.yaml" in "/Users/<usrname>/AndroidStudioProjects/inventory_system".)

3

Answers


  1. Open the terminal.
    Create the folder for your project by typing the command:

    mkdir my_awesome_project
    

    Navigate to the created folder:

    cd my_awesome_project
    

    In the folder type the command for project creation:

    flutter create myawesomeproject
    

    Open the AndroidStudio and then open the created folder.

    Now you are ready to run and develop your app.

    Login or Signup to reply.
  2. the easiest and simplest way to create new flutter project is to add flutter plugin to android studio/vs code and selecting SDK dir and then you can simply create new flutter project by clicking on buttons
    and you can check flutter official guide

    Login or Signup to reply.
  3. First of all make sure your flutter is properly installed on your system. Faced the same issue. Try checking your installation and make sure everything is installed properly. Use this link: https://flutter.dev/docs/get-started/install

    Just uninstall android as well as flutter. Try installing them again. First download and install Flutter. Then download and install Android Studio. Follow the proper installation process. I guess your issue is because of the unproper installation.

    After flutter installation, open the folder where you have installed it, and open the file flutter_console which is a batch . It will open a console and then type:

    flutter doctor
    

    This will show you whether all the installation is properly carried out or not. But a better way is to perform proper installation.

    Also you need to set environment variable after the installation.


    Here is what happened with me when I installed flutter and android. This is just to show you the issue I had faced after installation

    enter image description here

    I then followed what was been said as error and got my flutter and android studio working.

    enter image description here

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