How to reboot emulator to test ACTION_BOOT_COMPLETED?

前端 未结 7 1652
清歌不尽
清歌不尽 2020-12-23 12:19

Well, I have searched a lot. People say that I need to close the window of emulator to close it. However, I need to reboot the emulator to catch ACTION_BOOT_COMPLETED by my

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-23 12:47

    First, make sure that USB Debugging is enabled from within the emulator:

    click:

    • the Home icon
    • Menu icon
    • 'Settings'
    • 'Applications'
    • 'Development'
    • make sure that the box next to 'USB debugging' contains a check mark

    from a command-line:

    adb -e reboot
    

    EDIT:

    This definitely doesn't work... very strange. I tested it and could not make the emulator reboot. It just hangs.

提交回复
热议问题