ionic打包apkFailed to execute shell command "input,keyevent,82"" on device: Error: adb: Command failed with exit code 137

2023-05-31,,

错误代码如下

BUILD SUCCESSFUL in 12s
46 actionable tasks: 1 executed, 45 up-to-date
Built the following apk(s):
/Users/hongye0/Documents/project/haitoujiaApp/platforms/android/app/build/outputs/apk/debug/app-debug.apk
ANDROID_HOME=/Users/hongye0/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home
No target specified, deploying to device '1c311fa1'.
none
Skipping build...
Built the following apk(s):
/Users/hongye0/Documents/project/haitoujiaApp/platforms/android/app/build/outputs/apk/debug/app-debug.apk
Using apk: /Users/hongye0/Documents/project/haitoujiaApp/platforms/android/app/build/outputs/apk/debug/app-debug.apk
Package name: io.ionic.starter
Failed to execute shell command "input,keyevent,82"" on device: Error: adb: Command failed with exit code 137
[ERROR] An error occurred while running subprocess cordova. cordova run android exited with exit code 1. Re-running this command with the --verbose flag may provide more information.

我的手机是MI6:

解决办法:

在开发者模式下,设置USB调试(安全设置),允许通过USB调试修改权限或模拟点击

ionic打包apkFailed to execute shell command "input,keyevent,82"" on device: Error: adb: Command failed with exit code 137的相关教程结束。

《ionic打包apkFailed to execute shell command "input,keyevent,82"" on device: Error: adb: Command failed with exit code 137.doc》

下载本文的Word格式文档,以方便收藏与打印。