NativeScript-尝试启动Android模拟器(找不到连接的设备)

时间:2018-11-03 20:53:23

标签: android nativescript

我使用 NativeScript 开发移动应用程序。我尝试使用tns run android --emulator模拟应用程序,但在1分钟或更短的时间内出现了以下错误。

λ tns run android --emulator
Searching for devices...
Starting Android emulator with image Pixel_2_API_25
Cannot find connected devices.
Emulator start failed with: Cannot run your app in the native emulator. Increase the timeout of the operation with the --timeout option or try to restart your adb server with 'adb kill-server' command. Alternatively, run the Android Virtual Device manager and increase the allocated RAM for the virtual device.
To list currently connected devices and verify that the specified identifier exists, run 'tns device'.
To list available emulator images, run 'tns device <Platform> --available-devices'.

当我键入以下命令时,我有一个仿真器设备( Pixel 2 API 2 ):tns device android --available-devices

1 个答案:

答案 0 :(得分:1)

有时候,模拟器可能需要很长时间才能启动。另一种选择是使用Android Studio-> AVD Manager启动要在其上运行的仿真器,然后tns运行android在仿真器上启动您的应用程序。