用Genymotion模拟器测试app

测试app最好的方式是使用一台真实的设备。Android模拟器是相当的慢,且它不能像真实设备那样为你提供

所有的特性(功能),例如相机、传感器。

要想使模拟器运行的快点,你可以安装Hardware Accelerated Execution Manager(HAXM),然而,还有一个

更好的办法,就是:Genymotion

Genymotion is a real, fast, and easy-to-use emulator and comes with real-world device configurations.

它有免费和付费版。

安装:

除了自身之外,还需要安装VirtualBox。因为Genymotion要使用Oracle虚拟机VirtualBox的虚拟化技术

来虚拟化各种Android操作系统。

安装过程中出现了启动问题,我的解决办法是对于Genymotion和VirtualBox都要修改为以兼容模式运行

Windows Server 2008 (Service Pack 1)),且以管理员身份运行。不过,在启动虚拟设备时,仍然报com

对象问题,我是干脆把Virtualbox缓存4.3.12版,就好了。

 运行app时报waiting for adb,等一会后报错,发现要先启动Android Studio,再启动Genymotion。

还有就是gradle版本不匹配问题,如果报要求gradle 2.10,那么除了要根据它的提示修改

gradle/wrapper/gradle-wrapper.properties中的版本,还要修改Studio的File>Settings>Build,Execution,

Deployment>Build Tools>Gradle : 勾选Use default gradle wrapper

猜你喜欢

转载自zsjg13.iteye.com/blog/2411674