LoginSignup
4
5

More than 5 years have passed since last update.

Androidの開発環境構築において、emulatorで躓いたところ

Last updated at Posted at 2017-02-23

emulatorの起動に失敗

Hax is enabled
Hax ram_size 0x60000000
HAX is working and emulator runs in fast virt mode.
emulator: Listening for console connections on port: 5554
Failed to sync vcpu reg
emulator: Serial number of this emulator (for ADB): emulator-5554
emulator: ERROR: Unfortunately, there's an incompatibility between HAXM hypervisor and VirtualBox 4.3.30+ which doesn't allow multiple hypervisors to co-exist.  It is being actively worked on; you can find out more about the issue at http://b.android.com/197915 (Android) and https://www.virtualbox.org/ticket/14294 (VirtualBox)
Failed to sync vcpu reg
Failed to sync vcpu reg
Internal error: initial hax sync failed

VirtualBoxとAndroidエミュレータは同時に起動ができないため、エミュレータの起動に失敗していた。
DockerでVirtualBoxを使っていたので、Dockerを落としてからEmulatorを起動。

ローカルサーバに接続に失敗

androidのエミュレータから127.0.0.1に接続すると、エミュレータ自身への接続となってしまい、ローカルサーバには接続ができない。
10.0.2.2に接続することで、ローカルサーバへの接続可能。
Railsのwebrickで立ち上げている場合(port: 3000)、
http://10.0.2.2:3000
で、アクセスする事が出来る。

4
5
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5