如何使用Genymotion重启(BOOT COMPLETED)后测试我的应用程序我使用nexus 4作为设备
<receiver android:name="com.template.SampleBootReceiver"
android:enabled="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>
</receiver>
答案 0 :(得分:40)
您可以将命令行与adb reboot
一起使用。它应该重启你的设备。
要使用adb,您需要位于adb二进制文件夹中。即,如果未安装android SDK,则为<android SDK>/platform-tools/
或<genymotion folder>/tools/
。您还可以将这些文件夹添加到您的路径中以从任何位置访问它。
答案 1 :(得分:18)
在Mac上为我工作:
Genymotion模拟器重启......
答案 2 :(得分:9)
您可以按下仿真器电源按钮。按下后,您将看到选项对话框。该对话框可以选择“重新启动”。希望得到帮助。
答案 3 :(得分:6)
使用@ eyal-lezmy的答案以及网络上的其他内容找到解决方案。 如果您运行的设备不止一个,则可以通过这种方式重新启动特定设备
从<genymotion-installer-path>
发布
genymotion-shell
在shell中运行devices
,记下要重启并退出的设备的IP地址和端口。
从<android-sdk-folder>/platform-tools
运行
adb -s <device-ip>:<device-port> reboot
答案 4 :(得分:1)
在linux上,我在/path/to/genymotion/tools/adb
就我而言:
~/genymotion/tools/adb reboot
像魅力一样。
答案 5 :(得分:0)