如果没有安装Android Studio,无法安装和运行VSCode的Android模拟器



我是VScode和Flutter开发的新手。我试图在VScode中安装和运行android模拟器,而不安装android studio。以下是我所遵循的步骤。

  1. 安装VSCode在"C:Program FilesMicrosoft VSCode Code.exe".
  2. 已提取的Flutter SDK 3.0.0在E: as E: Flutter .
  3. 下载tools_r26.1.1-windows并解压到E:Android SDK.
  4. 在VScode中,分别安装Dart和flutter插件。
  5. 在VScode终端使用如下命令设置SDK路径flutter config——Android -sdk E:Android SDK"我得到的回复是Setting "android-sdk"值到"E: android"。我重启IDE并进入下一步。
  6. 通过在系统变量和用户变量的Path中添加E:flutterbin更新了环境变量中的路径。对Android SDK文件夹做了同样的处理。
  7. run Flutter Doctor和我得到以下响应
[√] Flutter (Channel stable, 3.0.0, on Microsoft Windows [Version 10.0.22000.675], locale en-IN)
[X] Android 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/docs/get-started/install/windows#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.
[X] Chrome - develop for the web (Cannot find Chrome executable at .GoogleChromeApplicationchrome.exe)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[!] Android Studio (not installed)
[√] VS Code, 64-bit edition (version 1.67.1)
[√] Connected device (2 available)
[√] HTTP Host Availability
! Doctor found issues in 4 categories.
  1. 当我尝试使用ctrl+shift+p启动模拟器并选择Flutter:Launch emulator时,会出现以下错误
avdmanager is missing from the Android SDK

我这里需要帮助。提前谢谢你。

您查看屏幕底部的build选项卡,它将显示错误消息和安装build工具的选项。安装它,你应该能够看到AVD管理器。另一种方法是去SDK管理器。在SDK Tools下,你会找到Android SDK Build工具。参考来源:https://www.tektutorialshub.com/android-studio/avd-manager-sdk-manager-missing-or-greyed-out-in-android-studio

最新更新