【问题标题】:CordovaError: Failed to execute shell command "getprop,dev.bootcompleteCordovaError:无法执行 shell 命令“getprop,dev.bootcomplete
【发布时间】:2018-08-04 12:35:57
【问题描述】:

当我尝试运行命令 ionic cordova run android 时,我在 cmd 中遇到了一些错误

audio: Failed to create voice `adc'
(node:4940) UnhandledPromiseRejectionWarning: CordovaError: Failed to execute shell command "getprop,dev.bootcomplete"" on device: Error: C:\Users\hi\AppData\Local\Android\Sdk\platform-tools\adb.exe: Command failed with exit code 1 Error output:
error: device still authorizing
    at D:\product\project-1\frontend\platforms\android\cordova\lib\Adb.js:88:25
    at _rejected (D:\product\project-1\frontend\platforms\android\cordova\node_modules\q\q.js:864:24)
    at D:\product\project-1\frontend\platforms\android\cordova\node_modules\q\q.js:890:30
    at Promise.when (D:\product\project-1\frontend\platforms\android\cordova\node_modules\q\q.js:1142:31)
    at Promise.promise.promiseDispatch (D:\product\project-1\frontend\platforms\android\cordova\node_modules\q\q.js:808:41)
    at D:\product\project-1\frontend\platforms\android\cordova\node_modules\q\q.js:624:44
    at runSingle (D:\product\project-1\frontend\platforms\android\cordova\node_modules\q\q.js:137:13)
    at flush (D:\product\project-1\frontend\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:4940) 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:4940) [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.
[7104]:WARNING:android/android-emu/android/base/async/AsyncSocketServer.cpp:99:Error when accepting host connectionError message: Unknown error
UpdateLayeredWindowIndirect failed for ptDst=(1002, 87), size=(272x21), dirty=(272x21 0, 0) (The system cannot find message text for message number 0x%1 in the message file for %2.)

此处模拟器弹出,但该应用在设备中不可用。我已经尝试了他在link 中描述的方法,但仍然出现此错误。

【问题讨论】:

    标签: cordova ionic-framework ionic3 cordova-android


    【解决方案1】:

    由于您的错误消息与我其他答案中的错误消息不同,请尝试编辑代码以添加您的错误消息。

    if ((error && error.message &&
        (error.message.indexOf('not found') > -1)) ||
        (error.message.indexOf('device offline') > -1) ||
        (error.message.indexOf('device still connecting') > -1) ||
        (error.message.indexOf('device still authorizing') > -1))
    

    【讨论】:

    • 是的,我已经尝试过了,但仍然出现错误。 UnhandledPromiseRejectionWarning: CordovaError: Failed to execute sh ell command "getprop,dev.bootcomplete"" on device: Error: C:\Users\hi\AppData\Lo cal\Android\Sdk\platform-tools\adb.exe: Command failed with exit code 1 Error ou tput: error: device unauthorized. This adb server's $ADB_VENDOR_KEYS is not set Try 'adb kill-server' if that seems wrong.
    • 这是一个不同的错误,它告诉你设备没有被授权。它不是在设备上向您显示授权的提示吗?尝试禁用和启用 USB 调试和/或撤销授权,以便再次提示您
    • 不,它没有显示在设备上。我正在模拟器中尝试不使用 USB 调试..
    • 然后确保您的计算机上没有插入任何设备,并创建一个新的模拟器,因为那个模拟器似乎有问题。
    猜你喜欢
    • 2018-12-01
    • 2018-11-28
    • 2020-05-19
    • 1970-01-01
    • 1970-01-01
    • 2021-06-01
    • 2017-07-09
    • 1970-01-01
    • 2021-12-22
    相关资源
    最近更新 更多