Unable to start android emulator

#1

I’m trying to start a project that runs fine on my iOS device, however, when I try via the android emulator to test it, I get “Couldn’t start project on Android:” and nothing else as an error.

This has worked previously (about a week ago). I’ve followed the steps here to a tee:
https://docs.expo.io/versions/v12.0.0/guides/genymotion.html#genymotion

I’m able to run adb devices from the command line and see the device running. I’ve also ran exp path to add the adb tools to the expo path. Lastly, I’ve tried deleting the apk cache from the ~/.expo directory.

Really at a loss here.

Any help appreciated.

#2

Can you try typing in the URL for your project into a browser on the emulator?

That URL would look something like exp://ac-jpn.ccheever.circular-progress-test.exp.direct:80

#3

@ccheever good idea!

mine is actually a local URL, could that possibly be the problem?

exp://192.168.1.138:19000

When I type this into the browser, nothing is found.

The way I got around this is I just built the android .apk and dragged it onto the emulator. This works, but obviously I’d prefer to use the expo app since building takes such a long time.

#4

What if you go into the Expo app and try typing in the URL there? Do you get the same result?

#5

Ah ha! That worked!

I just realized something. That IP address I’d given you was when I ran npm start from the command line. If I instead use the expo xde, I get exp://localhost:19000 as the ip address. When I tried the localhost IP address in the expo app on the emulator it failed. This must be the problem. Is there any way to change the expo xde IP address? If not, no big deal. I don’t mind running from the command line as I typically only test android after finishing an app.

#6

You should change network adapter priority settings.

  1. Go to Control Panel > Network and Internet > Network Connections
  2. Right click the desired connection (Higher Priority Connection, in this case it should be your main lan/wlan connection)
  3. Click Properties > Internet Protocol Version 4
  4. Click Properties > Advanced
  5. Uncheck ‘Automatic Metric’
  6. Enter 10 in ‘Interface Metric’
  7. Click OK

Repeat the same action for other adapters, but use 20 or higher number to prioritize your main adapter.

#7

Is this for Windows?

I’m using Linux.

#8

This is for Windows. I don’t know how to do it in Linux. Maybe you can search for “how to change primary network adapter in linux”