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

Multi tool use
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:
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:
$ adb --start-server
Android/Sdk/
$ adb --start-server
$ 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?
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?
.bashrc
$ANDROID_HOME
$ANDROID_HOME
After doing the above, $ ps -aux | grep 5037
outputs the following:
$ ps -aux | grep 5037
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:
cd
$ ./adb kill-server
ps
$ ./adb start-server
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.
adb
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:
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?
@DeepakSingh Yeah, I've now answered my post with what I eventually got it working for me. Hope it helps.
– Sam
Jul 3 at 11:46
1 Answer
1
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.
export PATH="/home/darik/projects/android/genymotion/tools:$PATH"
.bashrc
I've installed Genymotion and added a virtual device. Under the setting for adb I've pointed to the /opt/genymobile/genymotion/tools path. What you have left here to do in .bashrc file I've done that too with the path set same as mentioned above. Now when start the expo and do "Install Android App" I get this error. ADB server didn't ACK * failed to start daemon * error: Here now I'm not sure about both the paths which I've set. Any help would be appreciated.
– Deepak Singh
Jul 3 at 13:46
I don't think you need the
/tools
at the end of your ADB settings. Try just /opt/genymobile/genymotion
or just selecting the 'Use Genymotion Android tools (default)' radio button instead, since I'm pretty sure that they both mean the same thing.– Sam
Jul 4 at 5:40
/tools
/opt/genymobile/genymotion
In the expo when go to expo menu and click on the Install andriod App it still gives me same error.
– Deepak Singh
Jul 4 at 13:08
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
You got any solution for this mate?
– Deepak Singh
Jul 3 at 11:40