Failed to execute shell command “getprop,dev.bootcomplete”" on device: error for Android

前端 未结 4 2063
无人及你
无人及你 2020-12-29 22:18

I am getting the getprop,dev.bootcomplete error after building and deploying the new debug-apk file to the Android emulator through Ionic framework.

The

相关标签:
4条回答
  • 2020-12-29 22:40

    This was a solution for me in Ionic 3 version:

    1. Open Android studio, go to AVD Manager
    2. Create a new AVD device, click on "show advanced settings"
    3. Select "Cold boot". By default, the "Quick boot" is selected.

    Try to run emulator again.

    0 讨论(0)
  • 2020-12-29 22:40

    I was get the same error when working with the following command on my windows 10 machine,

    cordova emulate android --target=N5Oreo
    

    Windows 10 Corodva 7.1.0 Oreo based emulator

    the issue was fixed temporarily with the answer by jcesarmobile (Failed to execute shell command "getprop,dev.bootcomplete"" on device: error for Android) but it kept on resurfacing.

    When i execute the command, the emulator was launched but the error kept coming again and again. I restarted the machine and and then it worked for few days then it kicked in again.

    I found that adb is a powerful tool. So instead of depending on cordova emulate android --target=N5Oreo to build and launch I used cordova build android and installed the resultant build by using adb install myApp.apk to the currently running emulator.

    0 讨论(0)
  • 2020-12-29 22:41

    This is a cordova-android bug because Google probably changed the error message when trying to run the app.

    It has been fixed already and released in cordova-android 7.1.1 or newer. If you can't update to those versions do:

    I think it would work if you apply this change yourself to yourAppName/platforms/android/cordova/lib/emulator.js

    Change

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

    to

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

    0 讨论(0)
  • 2020-12-29 22:47

    Another workaround is to start emulator from Android studio and then run cordova command to run app. This way cordova finds the emulator already running and it avoids the race condition. Thanks!

    0 讨论(0)
提交回复
热议问题