在通过Ionic框架构建和部署新的debug-apk文件到Android模拟器后,我得到了getprop,dev.bootcomplete错误.
模拟器弹出到Android的主屏幕,但该应用程序未安装在模拟器上,因此在启动时不会为模拟器打开.
我在这个问题上看过类似的帖子,尝试了adb中的不同步骤,为模拟器删除和创建新设备,我为API测试的API级别安装了x86和x86_64图像,其中包括API 26.我不确定我还能做些什么.我不相信从cordova中删除android然后再添加它将解决问题.错误日志如下.
编辑:
到目前为止,我在这个问题上看到的每篇文章都没有解决这个问题.我还没有卸载并重新安装Android Studio或任何SDK工具,但我认为我不需要.
可能导致问题的原因是我不得不将我的NDK版本恢复到r16b而不是更新的r17b,因为我的应用程序无法使用离子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,因为谷歌可能在尝试运行应用程序时更改了错误消息.
原文链接:https://www.f2er.com/bash/386922.html它已经修复,但尚未发布.
我认为如果您将this更改自己应用于yourAppName / platforms / android / cordova / lib / emulator.js,它会起作用
更改
if((错误&& error.message&&
(error.message.indexOf(‘not found’)> -1))||
(error.message.indexOf(‘device offline’)> -1))
至
if((错误&& error.message&&(error.message.indexOf(‘not found’)> -1))||(error.message.indexOf(‘device offline’)> -1)||(error.message.indexOf(‘设备仍在连接’)> -1))