What worked for me is
- Go to "flutter\packages\flutter_tools\gradle" path
- Delete the build folder
- open the project in android studio the gradle files will start downloading.
After everything is successful just run the project from the editor. It will work