gpt4 book ai didi

Android studio cordovaRun 无法使用设备运行

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:55:49 25 4
gpt4 key购买 nike

我正在使用 Android Studio 和 Cordova 开发一个简单的应用程序。但是当我运行时出现了这个错误:

(node:9856) UnhandledPromiseRejectionWarning: CordovaError: Failed to execute shell command "input,keyevent,82"" on device: Error: C:\Users\USER\AppData\Local\Android\sdk\platform-tools\adb.exe: Command failed with exit code 4294967177
at D:\sandbox\platforms\android\cordova\lib\Adb.js:88:25
at _rejected (D:\sandbox\platforms\android\cordova\node_modules\q\q.js:864:24)
at D:\sandbox\platforms\android\cordova\node_modules\q\q.js:890:30
at Promise.when (D:\sandbox\platforms\android\cordova\node_modules\q\q.js:1142:31)
at Promise.promise.promiseDispatch (D:\sandbox\platforms\android\cordova\node_modules\q\q.js:808:41)
at D:\sandbox\platforms\android\cordova\node_modules\q\q.js:624:44
at runSingle (D:\sandbox\platforms\android\cordova\node_modules\q\q.js:137:13)
at flush (D:\sandbox\platforms\android\cordova\node_modules\q\q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:9856) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:9856) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

我的设备是红米4A,已经开启了USB调试和USB安装。

最佳答案

启用:

  1. USB调试
  2. 通过 USB 安装
  3. USB 调试(安全设置) <-- 这很重要

关于Android studio cordovaRun 无法使用设备运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51259676/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com