问题
Just a day ago, Flutter, a new hybrid (mobile apps) development framework released by Google Inc.
I installed Flutter SDK, following steps, provided from this link: Install on macOS - iOS setup.
In the same steps, they provided a terminal command Run flutter doctor
to ensure, Flutter is installation and integration with Android Studio Editor.
Problem is, I've installed Android Studio - 3.0.1 in my mac (macOS - HighSierra) system. But Run flutter doctor
shows [✗] Android Studio (not installed)
in result.
What's missing here?
回答1:
I'm not on macos so don't know how things work in that.
Basically you need to export an environment variable. From your shell's config file do the following:
export ANDROID_HOME=/my/android/studio/installation/dir
If your shell is bash, then put the above line in .bashrc
file in your home directory and either source .bashrc
or restart the terminal.
That's how I fixed it on linux last night.
来源:https://stackoverflow.com/questions/49047716/flutter-unable-to-detect-identify-android-studio