Error: ADB exited with exit code 1 Performing Streamed Install with Flutter and Mac Big Sur with M1

2,046

Solution: I installed a software called XDisplay and it looks like its installation was giving some conflict. After uninstalling it, it solved the problem.

Share:
2,046
bluesparrow
Author by

bluesparrow

Updated on January 01, 2023

Comments

  • bluesparrow
    bluesparrow over 1 year

    I am getting the following error every time I try to run my app on a real device. Other people can run the same project using the same phone in another computer, so I think the problem is my computer.

    Error:
    error

    I tried to update the Android Studio and it worked, but then in the next day the same problem started again... So strange!

    Here is my Flutter doctor:

    Flutter doctor -v:
    flutter doctor -v

    I also have this log:

    adb: failed to install /Users/matheus/flutter/becare/develop2/becare_app/build/app/outputs/flutter-apk/app.apk: [2:48:10 PM] [DAP] [Info] ==> {"seq":28,"type":"event","event":"dart.log","body":{"message":"Error launching application on Mi 9 SE.\n","severity":2,"category":8}} [2:48:10 PM] [DAP] [Info] ==> {"seq":29,"type":"event","event":"output","body":{"category":"stderr","output":"Error launching application on Mi 9 SE.\n"}} [2:48:10 PM] [FlutterRun] [Error] [Flutter] Error launching application on Mi 9 SE. [2:48:10 PM] [DAP] [Info] ==> {"seq":30,"type":"event","event":"dart.log","body":{"message":"<== [{"event":"app.stop","params":{"appId":"3e89b0c8-b784-4d8e-9f3e-bc3eceed14cb"}}]\r\n","severity":0,"category":8}} [2:48:10 PM] [DAP] [Info] ==> {"seq":31,"type":"event","event":"dart.log","body":{"message":"Process terminated! null, SIGTERM","severity":0,"category":8}} [2:48:10 PM] [DAP] [Info] ==> {"seq":32,"type":"event","event":"dart.log","body":{"message":"Process exited (sigterm)","severity":0,"category":10}} [2:48:10 PM] [DAP] [Info] ==> {"seq":33,"type":"event","event":"output","body":{"category":"console","output":"Exited (sigterm)\n"}} [2:48:10 PM] [FlutterRun] [Info] [Flutter] <== [{"event":"app.stop","params":{"appId":"3e89b0c8-b784-4d8e-9f3e-bc3eceed14cb"}}] [2:48:10 PM] [FlutterRun] [Info] [Flutter] Process terminated! null, SIGTERM [2:48:10 PM] [DAP] [Info] ==> {"seq":34,"type":"event","event":"terminated"

    • Faiizii Awan
      Faiizii Awan over 2 years
      upgrade your flutter by running flutter upgrade. it is problem with the M1 machine. M1 support comes in flutter 2.5.1
    • bluesparrow
      bluesparrow over 2 years
      @FaiiziiAwan I did it, but the same problem happens :(
    • bluesparrow
      bluesparrow over 2 years
      @FaiiziiAwan I am always getting "The Flutter Daemon has terminated" on my VS Code too... and showing the log I attached to this question.
    • Faiizii Awan
      Faiizii Awan over 2 years
      never see such logs. did you tried on different device ? or emulator ?
    • bluesparrow
      bluesparrow over 2 years
      Yes. It happens with all Androids, emulator or real device. I even tried to run using Android Studio (because I was using VS code). But the same thing happens. Do you think it might be the adb? I am using the latest version. I tried to download the android-tools from the website and replace the folder but it's the same...
    • bluesparrow
      bluesparrow over 2 years
      When I try to run the project and that error shows, usually the device turns offline, checking with the command "adb devices".
    • bluesparrow
      bluesparrow over 2 years
      And if I uninstall the old app in the device, it installs the app, but shows that error, like it couldt run the app by itself. I can test the app this way, the problem is that I can't debug it.
    • bluesparrow
      bluesparrow over 2 years
      Another awkward thing... It started out of nothing. Then I upgraded Android Studio and it solved the problem. But in the next day the problem came back again 🤔
  • bluesparrow
    bluesparrow over 2 years
    I tried this, but I sill have this problem :( the device works with another phone and the same project, but using another computer.
  • Aikins Laryea
    Aikins Laryea over 2 years
    Then try upgrading to the latest version of flutter, from your flutter doctor it looks like your on 2.2 , latest is 2.5 on stable flutter upgrade then flutter clean build
  • bluesparrow
    bluesparrow over 2 years
    I did! The same problem is happening :(
  • bluesparrow
    bluesparrow over 2 years
    I am always getting "The Flutter Daemon has terminated" on my VS Code too... and showing the log I attached to this question.
  • Mohit Singh
    Mohit Singh over 1 year
    how did you find this? I'm facing a similar issue but I don't find any software installed around the same time that this started happening