I am trying to run the default app which comes when creating a flutter file using "flutter run" but it gives me the following error:The error I am facing. I did try installing gradle, creating a settings.gradle file in my root directory of project and run "gradle wrapper" it was successful but I still face the same error.
UPDATE: One of my parent directories had spaces in the directory name. After removing the spaces it solved the issue.
There shouldn't be any invalid characters like spaces, etc in any of the parent directory names.