gpt4 book ai didi

android - cordova 模拟 android 失败,出现 "device is still connecting"

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

我试图让一个新的 cordova 项目安装正常工作,但我无法让它在模拟器中运行。当我运行 cordova emulate android 时,出现以下错误:

(node:4822) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Failed to execute shell command "getprop,dev.bootcomplete"" on device: Error: adb: Command failed with exit code 1 Error output: error: device still connecting

它确实启动了模拟器,但没有任何反应。我在我的 config.xml 中添加了这个首选项:

<platform name="android">
<allow-intent href="market:*" />
<preference name="loadUrlTimeoutValue" value="700000" />
</platform>

最佳答案

你还有这个问题吗?我遇到了同样的问题,问题是设备确实还在连接

只需编辑 platform/android/cordova/lib/emulator.js 添加 (error.message.indexOf('device still connecting') > -1) 在第 344 行的 if 子句内或在 module.exports.wait_for_emulator 方法内,这样进程就不会终止,只会继续循环,直到它可以启动 adb.shell。

希望对您有所帮助。

关于android - cordova 模拟 android 失败,出现 "device is still connecting",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50731082/

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