连接的设备:
它正在运行开发人员选项并启用 USB 调试
它使用 MTP 作为设备文件管理器
驱动程序已安装到笔记本电脑上,没有问题,我可以正常浏览文件
当我运行时:ionic cordova run android --device
我得到这个输出:
BUILD SUCCESSFUL in 5s
42 actionable tasks: 42 up-to-date
Built the following apk(s):
C:\Users\K-PC\myApp\platforms\android\app\build\outputs\apk\debug\app-debug.apk
native-run.cmd android --app platforms\android\app\build\outputs\apk\debug\app-debug.apk --device
[native-run] ERR_NO_DEVICE: No hardware devices found. Not attempting emulator because --device was specified.
[native-run]
[native-run] More details for this error may be available online:
[native-run]
[native-run] https://github.com/ionic-team/native-run/wiki/Android-Errors
[ERROR] An error occurred while running subprocess native-run.
native-run.cmd android --app platforms\android\app\build\outputs\apk\debug\app-d... exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
我检查了该设备是否已使用列出native-run android --list
并得到以下输出:
Errors (!):
ERR_UNSUITABLE_API_INSTALLATION: No suitable API installation found.
More details for this error may be available online:
https://github.com/ionic-team/native-run/wiki/Android-Errors
Connected Devices:
No connected devices found
Virtual Devices:
No virtual devices found
我安装了 Android Studio,我的 AVD 管理器中有两个虚拟设备:
我想将 APK 部署到连接到我的笔记本电脑的设备上,而不是这些模拟器,但奇怪的是它甚至无法识别我的 AVD 管理器中的模拟器
我该如何解决这个问题?我希望我已经提供了足够的细节。
使用亚行
adb devices
该命令应该为您提供连接设备的列表。您必须接受电话上的调试模式。在尝试使用硬件设备运行应用程序之前,您应该检查adb是否至少与一台设备建立了连接。一些问题可能如下所示:
总之,您应该运行以下代码:
adb devices
,授权与计算机连接。解决上面已经评论过的问题(如果有的话)。ionic cordova run android --device
。本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句