windows - 在 Windows 上无需 Android Studio 或模拟器即可从 VS Code 运行 Flutter 到物理手机

标签 windows flutter visual-studio-code

我开始学习flutter工具包,需要在物理手机上运行该应用程序,不需要安装模拟器或Android studio,只需安装: A)Flutter sdk 并添加到 windows 路径。 B)安装vs code作为编辑器,只需添加flutter插件即可

C) 连接我的 Android 实体手机并已在开发者模式下工作。

运行命令时出现的问题

告诉我,我的手机未连接,当在 vs code 中使用 F5 运行应用程序时,要求模拟器,我不需要,我只需要物理手机。

那是flutter doctor,我有任何 body 可以帮助我将需要添加到我的电脑中的东西,不需要Android studio,不需要添加任何模拟器。

$ flutter doctor

[√Flutter (Channel stable, v1.12.13+hotfix.9, on Microsoft 
Windows [Version 10.0.17763.1158], locale ar-SA)
 [XAndroid toolchain - develop for Android devices
X 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/setup/#android-setup for 
detailed instructions).
  If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
  You may also want to add it to your PATH environment variable.

[!Android Studio (not installed)
[√ VS Code (version 1.44.2)
[!Connected device
No devices available

医生发现了 3 类问题。

最佳答案

您必须需要 android sdk 才能在 Android 上运行 flutter 应用程序,并需要 xcode 才能在 iPhone 上运行。下载android sdk并再次检查。

关于windows - 在 Windows 上无需 Android Studio 或模拟器即可从 VS Code 运行 Flutter 到物理手机,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61364244/

相关文章:

windows - 不允许在 Windows cmd 脚本变量值中使用括号?

html - Mac 上的 Sublime Text 3 [ctrl+逗号]

ruby-on-rails - 在 Docker 容器上进行远程调试时,无法使用 Visual Studio 代码中断任何断点

使用 vscode ctrl+f2 的 macos 无法按预期在 macos 上运行

firebase - 从 Firestore Listen 回调返回列表

visual-studio-code - Visual Studio 代码 : Another instance of Code is running but not responding

c - C 中的变量 popen 调用

python - 使用 Anaconda (Python) 在 Windows 上安装 Pyomo

flutter - 如何在 Flutter 桌面应用程序(Linux)中配置窗口标题?

json - Flutter - 如何解析 JSON 数据?