Skip to content
Advertisement

Expo/GenyMotion throws “ADB server didn’t ACK” when running project

I’m trying to set up a React Native project using GenyMotion and Expo on Ubuntu. However, when I click the ‘Device’ button in Expo to package the app onto the emulator, I get the following error in the Expo console:

ADB Server didn't ACK error

I initially tried to use React Native through Android Studio, with the inbuilt Android emulator, so I thought the issue might that my computer hasmultiple ADB versions (when I ran $ adb --start-server from the terminal, it’d run the Android Studio binary, not the GenyMotion one). So I:

  • Removed everything Android Studio related that I could find, including the SDK at Android/Sdk/ and now $ adb --start-server
  • Ran $ sudo apt-get remove adb android-tools-adb
  • Set the filepath for the Android SDK in GenyMotion to my GenyMotion Android SDK. But I’m guessing is the same as the default setting, so I don’t know if I needed to do this?

    GenyMotion Android SDK

  • Removed all path variables related to Android Studio from my .bashrc file, including $ANDROID_HOME. (should I instead set $ANDROID_HOME to point to the GenyMotion Android SDK?

After doing the above, $ ps -aux | grep 5037 outputs the following:

ps output

even after quitting GenyMotion and Expo, so it looks like there is still a forked ADB daemon running. If I cd to my GenyMotion SDK and run $ ./adb kill-server (after quitting GM and Expo) that process doesn’t show up in the output of ps anymore. However, interestingly, if I run $ ./adb start-server I get this:

ADB out of date

But I don’t know how to udpate the GenyMotion version of ADB. This also seems to indicate there are different ADB server and client programs. Is this correct? I have only ever interacted with the adb binary in the SDK folders.

UPDATE: I tried starting ADB from the terminal again, and cannot recreate the conflicting version error. The server starts perfectly now.

I was also having trouble with tunneling not working in Expo, so I’ve changed the host to localhost. It works, but I’m not sure exactly what the implications of this change are:

Expo host change

Obviously, I’m pretty new to Android development, and GenyMotion/Expo in particular. But I think I’ve been pretty thorough in my troubleshooting. What else can I try?

Advertisement

Answer

The solution, at least for me, was that I needed to add export PATH="/home/darik/projects/android/genymotion/tools:$PATH" to my .bashrc file. I’m guessing the reason the ADB server wasn’t ACKing was that Expo couldn’t find the ADB server in my path env variable.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement