Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter run command error : FlutterView.send called on a detached view

Tags:

flutter

dart

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

like image 229
Mahi Avatar asked Sep 26 '17 09:09

Mahi


2 Answers

Instead of reinstall try with following: (Mac)

  • Set Path Variable: via following terminal command

    export PATH=~/flutter/bin:$PATH;

that is bin folder path of flutter.

   export PATH=[PATH_TO_FLUTTER_GIT_FOLDER]/bin:$PATH

https://flutter.io/setup-macos/#update-your-path

  • If above not worked. Check with the Dart version

    dart --version

Install the latest dart version:

    brew install dart --devel

Hope this helps others.

like image 112
Arvind Avatar answered Oct 29 '22 08:10

Arvind


For Mac open terminal

  1. $ echo $PATH it will show like this /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin: it means you need to add flutter in to path

  2. Open Finder presss command + shift + G

    Put /etc/paths in dialog and press GO enter image description here

    Copy the file "paths" and paste it on desktop

  3. Then open the pasted "paths" file from desktop and add following line into end of the file "/flutter/bin" enter image description here

  4. Then copy that file and again paste it on /etc/paths same like step no 2

  5. it will ask you to replace or not

    enter image description here

    press replace

Now if you hit $ echo $PATH on terminal it will show /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/swagat/development/flutter/bin

Now your $flutter doctor will work perfectly

like image 28
Swagat Mali Avatar answered Oct 29 '22 06:10

Swagat Mali