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?

ROOT
  • 11,363
  • 5
  • 30
  • 45
Amir
  • 11
  • 1
  • 1
  • 3
  • 1
    Firstly I'd recommend adding the flutter tag to reach users with experience in that. Please run flutter doctor -v and edit your answer to include the output of the console. – van Mar 15 '20 at 09:54
  • Have you added 'C:\flutter\bin' to your path variables, if so try running flutter doctor from AS terminal > flutter doctor see if it detects any errors – Jamal S Mar 15 '20 at 09:57
  • Probably it isn't Javascript. Java and Javascript are seperate languages. – Atahan Atay Mar 15 '20 at 10:03
  • see https://stackoverflow.com/a/70140796/11675817 – M Karimi Nov 28 '21 at 05:09

3 Answers3

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

paradian
  • 11
  • 3
1

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

0

Try this flutter pub upgrade --major-versions. I had similar issues but was resolved after that