'Error: Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1

Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1

I have this problem on Android Studio.
Does anybody know how to fix this problem?



Solution 1:[1]

Checking each of your .dart file if any file imports the unexpected module likes 'dart:js'; I remove the dart:js ,then the promble gone. it may be at the top of the .dart file

Solution 2:[2]

1.Close Android Studio

2.Delete antivirus

3.Reinstall the stable version of flutter sdk.

link: https://docs.flutter.dev/get-started/install?gclid=Cj0KCQjwvLOTBhCJARIsACVldV07PdaqGdZITkLHIXr3rycWiK-o_pQkoy6-hePjYXXDPZEPlgBE5RIaAmX1EALw_wcB&gclsrc=aw.ds

4.Open your project

5.Flutter clean

6.Flutter pub get

7.Finish

It worked for me!!!

Reason: Some antiviruses think flutter files are viruses and eat them

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 paradian
Solution 2