Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unexpected child "generate" found under "flutter"

Tags:

flutter

Cloning a repo and running command pub get throws this error:

Error detected in pubspec.yaml:

Unexpected child "generate" found under "flutter".

Please correct the pubspec.yaml file at C:\Users\m3\repos\gallery\pubspec.yaml

Screenshot

UPDATE

Running these commands suggested on repository, does NOT solve the error:

C:\Users\m3\repos\fork\gallery>C:\Users\m3\Downloads\flutter_windows_1.20.4-stable\flutter\bin\flutter.bat channel master

C:\Users\m3\repos\fork\gallery>C:\Users\m3\Downloads\flutter_windows_1.20.4-stable\flutter\bin\flutter.bat upgrade

C:\Users\m3\repos\fork\gallery>C:\Users\m3\Downloads\flutter_windows_1.20.4-stable\flutter\bin\flutter.bat channel stable

C:\Users\m3\repos\fork\gallery>C:\Users\m3\Downloads\flutter_windows_1.20.4-stable\flutter\bin\flutter.bat upgrade
like image 835
user3405291 Avatar asked Sep 02 '20 14:09

user3405291


2 Answers

A bit late to the party, but I fixed it by upgrading flutter with flutter upgrade.

like image 76
Caleb Robinson Avatar answered Nov 16 '22 12:11

Caleb Robinson


The error got resolved by running these two commands only:

C:\Users\m3\repos\fork\gallery>C:\Users\m3\Downloads\flutter_windows_1.20.4-stable\flutter\bin\flutter.bat channel master

C:\Users\m3\repos\fork\gallery>C:\Users\m3\Downloads\flutter_windows_1.20.4-stable\flutter\bin\flutter.bat upgrade

Note

Stay in master channel and do NOT return to stable channel, while you're working on this repository.

like image 3
user3405291 Avatar answered Nov 16 '22 11:11

user3405291