gpt4 book ai didi

android - 无法在设备 : error for Android 上执行 shell 命令 "getprop,dev.bootcomplete"“

转载 作者:IT老高 更新时间:2023-10-28 22:15:55 38 4
gpt4 key购买 nike

在通过 Ionic 框架构建并部署新的 debug-apk 文件到 Android 模拟器后,我收到 getprop,dev.bootcomplete 错误。

模拟器会弹出到 Android 的主屏幕,但该应用程序未安装在模拟器上,因此在模拟器启动时不会打开。

我查看过有关此问题的类似帖子,并尝试了 adb 中的不同步骤,为模拟器删除和创建新设备,并且我为我正在测试的 API 级别安装了 x86 和 x86_64 镜像,其中是 API 26. 我不确定我还能做什么。我不相信从cordova中删除android然后重新添加会解决这个问题。错误日志如下。

编辑:

到目前为止,我看到的关于这个问题的每一篇帖子都没有解决这个问题。我还没有卸载并重新安装 Android Studio 或任何 SDK 工具,但我认为我不需要。

可能导致问题的原因是我不得不将我的 NDK 版本恢复到 r16b 而不是更新的 r17b,因为我的应用程序没有使用 ionic cordova 正确构建。它现在正在正确构建,但模拟器仍然存在此问题并且不会安装我的应用程序。

错误日志:

emulator: Requested console port 5584: Inferring adb port 5585.
HAX is working and emulator runs in fast virt mode.
(node:11468) UnhandledPromiseRejectionWarning: CordovaError: Failed to execute shell command "getprop,dev.bootcomplete"" on device: Error: C:\Users\noaht\AppData\Local\Android\sdk\platform-tools\adb.exe: Command failed with exit code 1 Error output:
error: device still connecting
at C:\Noah\Noah School\SSAapp\SMAPP\platforms\android\cordova\lib\Adb.js:88:25
at _rejected (C:\Noah\Noah School\SSAapp\SMAPP\platforms\android\cordova\node_modules\q\q.js:864:24)
at C:\Noah\Noah School\SSAapp\SMAPP\platforms\android\cordova\node_modules\q\q.js:890:30
at Promise.when (C:\Noah\Noah School\SSAapp\SMAPP\platforms\android\cordova\node_modules\q\q.js:1142:31)
at Promise.promise.promiseDispatch (C:\Noah\Noah School\SSAapp\SMAPP\platforms\android\cordova\node_modules\q\q.js:808:41)
at C:\Noah\Noah School\SSAapp\SMAPP\platforms\android\cordova\node_modules\q\q.js:624:44
at runSingle (C:\Noah\Noah School\SSAapp\SMAPP\platforms\android\cordova\node_modules\q\q.js:137:13)
at flush (C:\Noah\Noah School\SSAapp\SMAPP\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:11468) 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:11468) [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.
emulator: S
aving state on exit with session uptime 4695 ms

最佳答案

这是一个cordova-android bug因为 Google 可能在尝试运行应用程序时更改了错误消息。

它已经修复并在 cordova-android 7.1.1 或更新版本中发布。如果您无法更新到这些版本,请执行以下操作:

我认为如果你申请 this 就可以了将自己更改为 yourAppName/platforms/android/cordova/lib/emulator.js

改变

if ((error && error.message &&
(error.message.indexOf('not found') > -1)) ||
(error.message.indexOf('设备离线') > -1))

if ((error && error.message &&
(error.message.indexOf('not found') > -1)) ||
(error.message.indexOf('设备离线') > -1) ||
(error.message.indexOf('设备仍在连接') > -1))

关于android - 无法在设备 : error for Android 上执行 shell 命令 "getprop,dev.bootcomplete"“,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50935337/

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