Unable to run new flutter sample code in IntelliJ IDEA

1,310 views
Skip to first unread message

Naveen Cherian

unread,
May 30, 2017, 10:54:48 AM5/30/17
to flutt...@googlegroups.com

I installed IntelliJ IDEA, downloaded both the flutter and dart plugins, Installed android studio and jdk . I opened configured IntelliJ IDEA to point at the android sdk and jdk. 
I opened up IntelliJ IDEA and created new project->flutter. I clicked on build and got an error message.

I ran Flutter Doctor and confirmed that i got no errors

The built-in library 'dart:ui' is not available on the stand-alone VM. library handler failed export 'dart:ui' show Locale Process finished with exit code 254 Failed to connect to the VM observatory service: java.io.IOException: Failed to connect: ws://127.0.0.1:46579/ws Caused by: de.roderick.weberknecht.WebSocketException: error while creating socket to ws://127.0.0.1:46579/ws Caused by: java.net.ConnectException: Connection refused


Please help

0fDLEkE.png
kLau1dN.png
TXjBnZlg.png

Devon Carew

unread,
May 30, 2017, 11:31:18 AM5/30/17
to Naveen Cherian, Flutter Dev
Your setup looks good! I think IntelliJ is trying to run your app as if it was a command-line dart app, not a Flutter one. There are some settings in IntelliJ to allow you to manage your launch configs. I would:
  • delete the dart command-line one
  • create a flutter one for your app (or confirm that one exists)
Then, from the launch config drop-down, select the flutter launch config for your app and hit run.

There are some docs here: https://flutter.io/intellij-ide/#running-and-debugging, though they don't cover creating a launch config.


--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Devon Carew
Software Engineer
Google, Inc.
Reply all
Reply to author
Forward
0 new messages