Impossible to run expo with Genymotion

Hello,

I got the following error message when I try to start expo on Genymotion :

Couldn't start project on Android: adb E  7965 1135073 usb_osx.cpp:138] Unable to create an interface plug-in (e00002be)
error: could not install *smartsocket* listener: Address already in use
ADB server didnt ACK
* failed to start daemon *
error: cannot connect to daemon

I tried to solve it by reading some similar topics but always the same problem…

Genymotion_pour_usage_personnel_et_Expo_XDE

Paramètres_et_Genymotion_pour_usage_personnel

Anybody can Help me ?

Hi! Have you followed all of the steps in the Genymotion guide?

Hello,

Yes of course ! But I am not sur of this steps :

-If you are on macOS or Linux, add the Android SDK location to your PATH using ~/.bash_profile or ~/.bash_rc.
-On macOS, you will also need to add platform-tools to your ~/.bash_profile or ~/.bash_rc., by adding a line like export PATH=/Users/myuser/Library/Android/sdk/platform-tools:$PATH

What are you unsure about in those steps?

Hi !

I put the following lines in the .bash_profile file like this but it doesn’t work :

sofienethibault_—nano__bash_profile—_80×24

Assuming you have Android Studio installed, that should be fine.

You probably restarted the machine by now, but the original error message says:

Address already in use

So maybe you should find out what process is already running on the port that Genymotion/adb are trying to use and act appropriately. (either kill that process or change the port)

The virtual terminal is correctly running. But when I click on “Open on Android” I got the same error message…

sofienethibault_—-bash—80×7_et_Genymotion_pour_usage_personnel-Google_Nexus_5X-7_1_0-API_25-1080x1920__1080x1920__420dpi_-_192_168_56_101_et_Expo_XDE

Hi,

I was also stuck on a mac, so here is a step-by-step guide that worked for me. It might be a bit too detailed but I wanted to make it as easy to follow as possible. I was missing some key points and spent way too much time figuring out what was wrong in the original documentation, so this might be helpful to you as well:

Option 1: Use Android Studio’s tools

  • ‘Install Android Studio.’ - search google for it, download and install it. also, install genymotion
  • ‘Go to Configure -> SDK Manager.’ - open Android Studio and do this
  • ‘In SDK Manager, make sure you are in Appearance & Behaviour -> System Settings -> Android SDK. Your SDK and tools are in the box that says Android SDK Location. Remember this location!’ - check if you have all the tools installed as indicated in the latest expo genymotion documentation
  • ‘If you are on macOS or Linux, add the Android SDK location to your PATH using ~/.bash_profile or ~/.bash_rc.’ - open finder and go to your root directory (it is on the left side with a small house icon) and press ‘cmd+shift+.’ that will bring up the hidden files. look for .bash_profile or .bash_rc file and open with text editor. now, type in a new line:
    export ANDROID_HOME=/Users/username/Library/Android/sdk
    and substitute your ‘username’ to your username. you can double check if this is the right path on the top of the window in ‘Android SDK Location’ box that you opened in the previous step
  • ‘On macOS, you will also need to add platform-tools to your ~/.bash_profile or ~/.bash_rc., by adding a line like export PATH=/Users/myuser/Library/Android/sdk/platform-tools:$PATH’ - in the same file from previous step, add the following line:
    export PATH=/Users/username/Library/Android/sdk/platform-tools:$PATH
    and again write in your correct username and save the file
  • ‘Make sure that you can run adb from your terminal.’ - this was the part where I got stuck, the easiest way is to enter the following commands in your terminal (line by line):
echo 'export PATH=$PATH:~/Library/Android/sdk/platform-tools/' >> ~/.bash_profile
source ~/.bash_profile
adb devices
  • ‘Open Genymotion and navigate to Settings -> ADB. Select “Use custom Android SDK tools” and update with your Android SDK location:’ - just use the same location as you have seen in the Android SDK manager
  • ‘Start Genymotion’

Step 2: Set your path in XDE

  • ‘Run npm install -g exp to install exp globally.’ just run npm install -g exp in the terminal
  • ‘Then run exp path. This will save your PATH environment variable so that XDE knows where to find your Android tools.’ - just run exp path in the terminal

Now start Expo XDE and after opening the project choose ‘open on Android’. It should work fine now. If this guide helped for you please share which part was problematic for you, maybe the Expo guys will add extra info in the documentation to the most problematic parts. Thx!

2 Likes

Expo genymotion doesn’t really work anymore…I find just setting Android Studio and setting up the developer environment there and deploying through the terminal works.
1.get Android Studio( install, setup and select a phone to simulate)
3.press the play button in Andriod Studio
2.use npm start in terminal and select a…it should start running your code (it takes a couple of minutes sometimes)

I spent a long time tackling this issue and finally got it to work. :tada:

Here are my findings: https://medium.com/@psyanite/how-to-use-genymotion-with-expo-cc52815928cf

Genymotion never registers on adb devices. I think they have a paywall now

To everyone having this problem, you do not need to download Android Studio, the main reason why i use Genymotion is to not have to use Android Studio in the first place.
So here is what you do (Windows or Mac):

  1. First go to https://developer.android.com/studio/releases/platform-tools and download your tools in a zip format for your OS (Mac or Windows)
  2. After you extract the folder somewhere, you need to add that folder in the path, please search online on how to do this correctly.
  • On windows you would go to environment variables and add the folder location to PATH
  • On mac you would export this path on your ~/.bash_profile, but remember that if you have latest macos catalina like me, it doesnt come with bash anymore but with zsh, and that means the file would be ~/.zprofile
  1. After exporting that folder to PATH, go to Genymotion settings, under adb, choose custom and browse to this folder, leave it like that even if it says “folder is not correct sdk path”
  2. Run your device in genymotion
  3. Make sure to quit all running expo or VSC or any terminals just to be sure, and re-run expo start, and try again.

Tip:

  • Before running the genymotion device, please check and see if any adb services are already running, maybe kill them before re-running (i use htop to easily filter and kill a process).
  • If after you did everything in the steps above and when you open a terminal you cant run command “adb devices” than it means you have not exported to path correctly, or maybe you didnt restart terminal :slight_smile: