首页 > 解决方案 > NativeScript 说没有找到模拟器图像?

问题描述

所以这是我第一次使用本机脚本,我似乎无法让它识别任何模拟器?我还下载了 NativeScript,它说我也缺少模拟器。

跑步tns device android --available-devices回报

Available emulators
┌─────────────┬──────────┬─────────┬───────────────────┬──────────────────┬────────────┐
│ Device Name │ Platform │ Version │ Device Identifier │ Image Identifier │ Error Help │
└─────────────┴──────────┴─────────┴───────────────────┴──────────────────┴────────────┘

Connected devices & emulators
Searching for devices...
Cannot find connected devices. Reconnect any connected devices, verify that your system recognizes them, and run this command again.

在 Sidekick 上,我想使用云构建,因为我在 Windows 上并且不能拥有 xcode,但这也告诉我它找不到任何设备? https://i.imgur.com/PiVrSML.png

单击“虚拟设备启动器”按钮时,它只是告诉我没有找到模拟器图像?

标签: javascriptandroidiosnativescript

解决方案


以管理员身份运行Command Prompt并执行:

@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://nativescript.org/setup/win-avd'))"

这应该会在您的 Windows 系统上下载/修复 Android AVD。


推荐阅读