question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[macos] Command "flutter doctor" does not give the same output as integrated terminal

See original GitHub issue

Hello !

I would like to thank you for your amazing work and dedication to provide this wonderful tool !

I have a strange bug which is that when I run the command flutter doctor via the plugin I do not get the same output as the integrated terminal. Both outputs are given below. On both instances both the iOS simulator and the Android emulator are open. Moreover, when press <kbd>F5</kbd> , or invoke Debug>Start Debugging with both the Android emulator and the iOS simulator only the iOS build is done.

I am pretty sure that solving the first problem will solve the second.

(integrated or not) Terminal output

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.3.1, on Mac OS X 10.13.4 17E199, locale fr-FR)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.3)
[✓] Android Studio (version 3.1)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.22.2)
[✓] Connected devices (2 available)

Command via plugin output

[flutter] flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.3.1, on Mac OS X 10.13.4 17E199, locale fr-FR)
[✗] Android toolchain - develop for Android devices
    ✗ ANDROID_HOME = /usr/local/share/android-sdk
      but Android SDK not found at this location.
[✓] iOS toolchain - develop for iOS devices (Xcode 9.3)
[✓] Android Studio (version 3.1)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.22.2)
[✓] Connected devices (1 available)

! Doctor found issues in 1 category.
exit code 0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
TheSirCcommented, Apr 29, 2018

So interestingly, after a reboot, everything is nicely in order… but… flutter run has still the previous value (even in the (integrated or not) terminal)… 😆 Here is the output :

* Error running Gradle:
Exit code 1 from: /Users/sirc/Documents/Personnel/Projets/grounduity/flutter/grounduity/android/gradlew app:properties:
Starting a Gradle Daemon (subsequent builds will be faster)
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.pom
Download https://dl.google.com/dl/android/maven2/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.jar


FAILURE: Build failed with an exception.

* Where:
Build file '/Users/sirc/Documents/Personnel/Projets/grounduity/flutter/grounduity/android/build.gradle' line: 24

* What went wrong:
A problem occurred evaluating root project 'android'.
> A problem occurred configuring project ':app'.
   > The SDK directory '/usr/local/share/android-sdk' does not exist.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 34s

Please review your Gradle project setup in the android/ folder.
1reaction
DanTupcommented, Apr 28, 2018

So when you run the Flutter Doctor command from VS Code now, what does it show ANDROID_HOME as? It’s possible you’ll need to restart for it to apply properly, I’m not sure. If it still shows /usr/local/share/android-sdk then this must be being set somewhere else; but I’m not familiar with all the places you can set env vars on macOS 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

Flutter command not found - android studio
macOS v10.14 (Mojave); Wireshark Path problem · Open terminal run. touch $HOME/.zshrc · Run. sudo nano ~/.zshrc · Type. export PATH=$PATH:/Path to ...
Read more >
macOS install | Flutter
Run flutter doctor​​ This command checks your environment and displays a report to the terminal window. The Dart SDK is bundled with Flutter;...
Read more >
How to Install & Set up Flutter on Mac | by Mishka | Medium
After restarting Android Studio, go back to your terminal, and enter flutter doctor again. You should see a green tick next to Android...
Read more >
How To Install Flutter on macOS - Level Up Coding
To run flutter commands in any terminal session, we have to add the Flutter SDK to our systems PATH variable. First, we will...
Read more >
env bash no such file or directory flutter
If you are on Windows. Make sure you are running the terminal as administrator or with developer permissions. Run fvm doctor if possible...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found