在无头运行Android应用程序

时间:2012-10-18 06:38:16

标签: android android-emulator headless

我可以在无头模拟器中运行Android应用程序。我尝试使用am命令,但它显示了NullPointer异常。我认为因为它是一个gui应用程序我不能。有什么办法吗?模拟器太慢了。有时需要5-7分钟。顺便说一下,我正在运行姜饼。

环境:我正在使用qemu源代码运行。来自android图像和内核映像。 qemu模拟器的参数是这样的:

-sysdir ../../android-image -kernel ../../android-kernel/zImage -no-window -qemu -monitor stdio

1 个答案:

答案 0 :(得分:0)

${android-sdk}/tools运行此命令:

emulator -avd NAME_OF_EMULATOR -no-skin -no-audio -no-window

在这篇博客中,很好地解释了:http://paulemtz.blogspot.cz/2013/05/android-testing-in-headless-emulator.html