Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No console output in Flutter IntelliJ plugin?

I am using Flutter + the Android Studio/IntelliJ plugin for Flutter. When I run my application in the IDE, there seems to be an empty console window so I cannot view my print statements from that window.

I am able to view output in the tomcat logs, so I am not blocked by this problem. Is there any reason why there is no output/functionality is my run window?

Update

Tried running using flutter run on commandline and I get my print statements on there. So this is just limited to Android Studio.

What I am expecting

enter image description here

What I am getting

enter image description here

Versions and App Information

Flutter Doctor Output

D:\manual-applications\flutter\bin\flutter.bat doctor --verbose
[√] Flutter (Channel beta, v1.0.0, on Microsoft Windows [Version 10.0.16299.785], locale en-US)
    • Flutter version 1.0.0 at D:\manual-applications\flutter
    • Framework revision 5391447fae (3 weeks ago), 2018-11-29 19:41:26 -0800
    • Engine revision 7375a0f414
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at D:/android-development/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • ANDROID_HOME = D:/android-development/sdk
    • Java binary at: D:\android-development\android-studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    X Android license status unknown.

[√] Android Studio (version 3.2)
    • Android Studio at D:\android-development\android-studio
    • Flutter plugin version 31.3.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[!] IntelliJ IDEA Community Edition (version 2018.2)
    • IntelliJ at C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2018.2.2
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.io/intellij-setup/#installing-the-plugins

[√] VS Code, 64-bit edition (version 1.28.2)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 2.21.1

[√] Connected device (1 available)
    • Android SDK built for x86 64 • emulator-5554 • android-x64 • Android 7.1.1 (API 25) (emulator)
like image 653
Shiraaz.M Avatar asked Dec 20 '18 18:12

Shiraaz.M


2 Answers

You might have mistakenly minimized the console output. But after you click it there is now way to restore it!

Here is the nasty button (the small arrow on console's tab works too!)

enter image description here

As said on flutter-intellij issues tracker and thanks to @sosite's answer, you will have to restore ~/Library/Preferences/AndroidStudio3.4/options/runner.layout.xml (you might need to change AndroidStudio3.4 with your own version) this lines:

   <ViewImpl>
     <option name="ID" value="ConsoleContent" />
     <option name="minimizedInGrid" value="false" />
     <option name="placeInGrid" value="bottom" />
     <option name="tabIndex" value="-1" />
     <option name="window" value="0" />
   </ViewImpl>

Replace

<option name="minimizedInGrid" value="true" />

by

<option name="minimizedInGrid" value="false" />

And it's back again!

like image 56
Hugo H Avatar answered Oct 11 '22 22:10

Hugo H


This happens, when you hide the console from the run window. i.e., Press here.

Unfortunately, Android Studio doesn't show a minimized icon, where we can tap to bring it back. Neither is there any shortcut assigned to this button.
You can bring it back by running the app in the debug mode. You can either see the logs there or kill it and run again in the run mode and you will see your logs back.

P.S. if you can't see your console even in the debug mode. Look for an icon like this on the top right corner of the window.
enter image description here

like image 9
RoyalGriffin Avatar answered Oct 11 '22 21:10

RoyalGriffin