离子Cordova运行android运行子流程本机运行时发生错误 [英] ionic cordova run android An error occured while running subprocess native-run

查看:43
本文介绍了离子Cordova运行android运行子流程本机运行时发生错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过运行以下命令在android设备(小米Pocophone)上运行我的离子应用程序:

I am trying to run my ionic app on an android device (Xiaomi Pocophone) by running the following command:

ionic cordova运行android

ionic cordova run android

但是,我收到以下错误消息:

However, I get the following error message:

BUILD SUCCESSFUL in 7s
42 actionable tasks: 42 up-to-date
Built the following apk(s):
        C:\laragon\www\ionicProject\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] Selected hardware device 4d65535f

[native-run] Installing platforms\android\app\build\outputs\apk\debug\app-debug.apk...

[native-run] ERR_UNKNOWN: Non-zero exit code from adb: 1

[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.

我的手机已通过USB Type C电缆正确连接,开发人员模式已打开且USB调试模式开启

My phone are properly connected via usb type c cable, developer mode is already turned on and usb debugging mode is turn on

我尝试重新启动PC并关闭不相关的IDE,例如Laragon

i have tried restarting PC and turn off unrelated IDE such as Laragon

下面是Java JDK 8安装在我的计算机上,我正在使用Windows 10 Pro

Below are Java JDK 8 installed on my computer, i am using Windows 10 Pro

环境变量系统路径如下

推荐答案

我遇到了同样的问题。我允许通过USB安装在我手机的开发人员选项中获得成功

I had the same issue. I allowed "Install via USB" in the developer options in my phone which results success

这篇关于离子Cordova运行android运行子流程本机运行时发生错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆