I created an emulator using sdkmanager
and avdmanager
and ran it with emulator
yet on restarting VScode, it couldn't detect the emulator
flutter devices
output:
2 connected devices:
Linux (desktop) • linux • linux-x64 • Ubuntu 20.04.5 LTS 5.15.0-48-generic
Chrome (web) • chrome • web-javascript • Google Chrome 106.0.xxx.xx
flutter doctor
output:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.4, on Ubuntu 20.04.5 LTS 5.15.0-48-generic, locale en_IN)
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed
instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[!] Android Studio (not installed)
[✓] VS Code (version 1.71.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability
I have only installed comandline tools from android studio and added to path.(which i expected to work) and havn't installed Android Studio thus that flutter doctor output is expected. So is there any way around this? :)
You have probably not set the emulator path at bash_profile.
Open a terminal and type sudo nano ~/.bash_profile
Add export PATH=$PATH:$ANDROID_HOME/emulator
if not there.
ps: make sure export ANDROID_HOME=$HOME/Android/Sdk
is also present above PATH=$PATH:$...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.