Mahi Mahi - 3 years ago 309
Dart Question

Flutter run command not working

Can anyone tell me why my app is not installing at all and ending with the error message

Observatory connection never became ready.

the app was working perfectly fine until yesterday .

I have changed the channel to master yesterday in the command prompt and from then on the app never runs.

I even switched back to channel alpha but still no use.

I have attached a screenshot of the command prompt where the installation was stuck forever.

I am not so sure if I need to reinstall the flutter. I am worried if I uninstall the flutter now it may not configure properly and I might break it forever.

Please can someone tell me what exactly might have gone wrong.

Many Thanks,
Mahi

Screenshot of command prompt

Answer Source

The solution is from Google Groups @Flutter-Dev

Thank you very much for your reply @Michael Thomsen.

I've tried what you have suggested and the details are as follows:

  1. When I used flutter run -v command the command prompt output is as follows: It was stuck for a while at waiting for port connection if I am not wrong.

So I've used AndroidStudio, File>Open and selected android/ folder to run the app then the gradle was showing an error:

Error:Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (25.2.0) and test app (25.4.0) differ. See http://g.co/androidstudio/app-test-app-conflict for details.

I modified the build.gradle(Module:app) to show the correct version of 25.2.0 which was previously showing 25.4.0.

 dependencies {
  androidTestCompile 'com.android.support:support-annotations:25.2.0'
  }

I just saved the changes inside android studio and the gradle sync completed without any errors.

Now I can run the app from inside Android Studio and also from IntelliJ IDE.

Thanks very much Michael this solved my problem.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download