문제

I am developing an Android application with jQuery Mobile, Phonegap and the jQuery plugin for Google maps. The emulator takes too long to load a web page, making the test of my code a painful operation. I have installed Android x86 on a virtual machine and linked it to Eclipse to debug my application.

This solution is faster than the emulator but the problem is that my application always crashes, which is not the case in the emulator. This leads me to question: is Android x86 on a virtual machine a stable alternative to the emulator?

도움이 되었습니까?

해결책

In my experience, the answer is definitely Yes.

Unlike the situation you are describing, my application never crashes on the Android-x86 VM and since the SDK's emulator doesn't support microphone input, it is actually the only way to test my app without having to purchase a real device for each variant of Android.

Also, as you noted, it runs much faster. Contrary to Google's claim for "near native speed", Android's SDK runs extremely more slowly than Android-x86 and it is certainly slower than a real phone or tablet.

The fact that your application crashes when run on an Android-x86 VM may actually be a good thing: An opportunity to check for ways to make your application more robust in unforeseeable circumstances (you know, there are many types of devices out there).

The only downside to Android-x86 is that it is only available up to ICS (Android 4.0.4) which means that you cannot test your application in Jelly Bean (Android 4.1.x). That may be solvable by building your own VirtualBox-AOSP.

다른 팁

A lot of virtualization software and systems depend on hardware virtualization capability of the CPU (VT and such), but VirtualBox runs Android x86 (eeepc iso) great (fast) even without it. There are obvious limitations, but bear in mind that any emulator can only go so far.

If your CPU has no support for hardware virtualization, it is a very good alternative.

Google's Android SDK Emulator went native since version 17.

Google said in their ADT version-17 changelog

One of the new features is a big update to the Android emulator – contributions to AOSP from Intel mean that the emulator now runs at near native speed on Windows and Mac OS X.

So you shouldn't be seeing huge differences In speed of the application running if you are using the latest version of sdktools and emulator.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top