Issue
I've created two emulators in AVD, one phone and one tablet and both are using the same x86 image (Jelly Bean, API 16). Both emulators are using 768 Mb RAM and the limit for HAXM is 2 Gb.
Running each emulator separately is working fine, however running them simultaneously causes an error if one emulator is already running and I'm trying to run the second one :
Cannot launch AVD in emulator... Could not open system.img: Invalid argument
What could be the reason for this behaviour and how may I fix this?
Edit: I can run both emulators simultaneously when using different system images (e.g. using API 16 and 17 works, but using API 16 twice does not).
Solution
Recent Emulator versions have the following piece of code:
if (!opts->no_snapshot_load || !opts->no_snapshot_save) {
android_op_writable_system = true;
}
This forces the emulator to open system.img for writing, even if it doesn't need to write into it. Windows doesn't allow to open a file multiple times for writing (unless you add specific flags to the call, and emulator doesn't). So the reason why emulator fails to start for the second time is that on Windows it has a bug: https://code.google.com/p/android/issues/detail?id=224402
Answered By - MT-Wizard
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.