尝试使用ionic cordova运行的android--设备时未找到设备/模拟器
连接的设备:尝试使用ionic cordova运行的android--设备时未找到设备/模拟器,android,ionic-framework,native,ionic-native,Android,Ionic Framework,Native,Ionic Native,连接的设备: 它正在运行启用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\
- 它正在运行启用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.
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--list
列出,我得到以下输出:
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.
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
adb devices
该命令应提供所连接设备的列表。您必须在手机上接受调试模式。在尝试使用硬件设备运行应用程序之前,您应该检查adb是否至少与一个设备连接。可能会出现以下问题:
没有显示任何内容,这使我意识到USB调试未正确启用。我在插入设备之前启用了它,这不允许我将设备添加为受信任的计算机。谢谢你的推动!