[英]How do I connect an Android phone to Visual Studio Code?
VSCode shows 'No Device' in the status bar, while Android Studio has no problems connecting to device over usb, or creating a virtual device. VSCode 在状态栏中显示“无设备”,而 Android Studio 通过 USB 连接到设备或创建虚拟设备没有问题。
When I run flutter doctor in VSCode terminal, I get:当我在 VSCode 终端中运行 flutter doctor 时,我得到:
When I click the 'No Device' (as a shortcut to Flutter: Launch Emulator), I get the error message当我单击“无设备”(作为 Flutter: Launch Emulator 的快捷方式)时,我收到错误消息
avdmanager is missing from the Android SDK
Android SDK 中缺少 avdmanager
I've tried:我试过了:
And nothing makes any change.没有任何改变。
Here is one of the workaround:这是解决方法之一:
Open Android Studio then click on SDK Manager (down-pointing arrow)打开 Android Studio 然后点击 SDK Manager(向下箭头)
This should open a new box with your Android SDK Location at the top.这应该会打开一个新框,顶部是您的 Android SDK 位置。 It should look like this:
它应该是这样的:
/Users/username/Library/Android/sdk
Configure the path of android-sdk配置android-sdk的路径
flutter config --android-sdk /Users/username/Library/Android/sdk
Add android-license to Flutter将 android-license 添加到 Flutter
flutter doctor --android-licenses
Then, you can run flutter doctor
to verify,然后,你可以运行
flutter doctor
来验证,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.