[英]Android Emulator not detected in VScode [ubuntu]
我使用sdkmanager
和avdmanager
创建了一个模拟器并使用emulator
运行它但在重新启动 VScode 时,它无法检测到模拟器
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
我只安装了来自 android studio 的命令行工具并添加到路径中。(我希望它可以工作)并且没有安装 Android Studio 因此 flutter 医生 output 是预期的。 那么有什么办法解决这个问题吗? :)
您可能没有在 bash_profile 中设置模拟器路径。
打开终端并输入sudo nano ~/.bash_profile
如果不存在,请添加export PATH=$PATH:$ANDROID_HOME/emulator
。
ps:确保export ANDROID_HOME=$HOME/Android/Sdk
也出现在PATH=$PATH:$...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.