skip to Main Content

Hello experts I am facing very big issue I am made application in 2021 on flutter my application is still live on play store now I need update it, problem is that I updated my android studio flutter version 3.0. Now opening my old project which was made in 2021 after opening it my pubspec.yaml file is missing in the project, I don’t no how to recover that file or repair it. They have a lot of dependencies included there is pubspec.lock file available but not pubspec.yaml please please help me i am in big check screen shot below

check now

if i use flutter create command i am getting this errors

flutter create command

2

Answers


  1. You can create a pubspec.yaml file on root directory or open the bottom terminal and try flutter create . it will provide default structure. Now to get pub package, check the import section and add on pubspec.yaml

    Login or Signup to reply.
  2. If you have a backup then paste the pubspec.yaml file from it. Else take a backup of the project. Run flutter create . in the root directory. It will create the pubspec file in the project. Click on configure dart and add the flutter path then run the project. It will throw errors for the packages used manually enter packages in pubspec or you can try flutter pub add <packagename>

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