【发布时间】:2020-10-31 12:30:44
【问题描述】:
连接的设备:
-
它正在运行开发人员选项并启用 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 管理器中的模拟器
我该如何解决这个问题?我希望我已经提供了足够的细节。
【问题讨论】:
标签: android ionic-framework native ionic-native