This question already has answers here:
React-Native, Android, Genymotion: ADB server didn't ACK
(13 answers)
Closed 5 years ago.
I installed create-react-native-app using yarn.
yarn create-react-native-app
Now, I have created my application named - myFirstProj as below -
create-react-native-app myFirstProj
I have installed Genymotion Android emulator and pointed to the up-to-date Android SDK. It has adb version 1.0.39
I can launch the emulator successfully, but I am not able to view my app on Android emulator, i get this error -
could not install *smartsocket* listener: Address already in use
ADB server didn't ACK
* failed to start daemon *
error: cannot connect to daemon
So, i checked the adb version in the node_modules of my app -
Path: node_modules/xdl/binaries/osx/adb
I see that the adb version is 1.0.32
Is there a way I can update my adb version to 1.0.39 inside the node_modules?
It appears this is a known issue. I can see here at this link people sharing the issue.
Following this guide will allow you to make sure your using the same tools everywhere. follow this guide here.
Step 1: Use the same version of the Android tools everywhere
Genymotion and XDE/exp both bundle their own versions of the Android
tools. In order for XDE or exp to communicate with Genymotion they
need to share the same set of tools. You can do this by either telling
XDE/exp to use Genymotion’s tools, or by installing Android Studio and
telling both XDE/exp and Genymotion to use the tools from Android
Studio.
Choose one of these two options:
Option 1: Use Genymotion’s tools Find Genymotion’s copy of adb. On
macOS this is normally
/Applications/Genymotion.app/Contents/MacOS/tools/.
Add the Genymotion tools directory to your path.
Make sure that you can run adb from your terminal.
Option 2: Use Android Studio’s tools Install Android Studio.
Make sure that you can run adb from your terminal.
Open Genymotion and navigate to Settings -> ADB. Select “Use custom
Android SDK tools” and update with your Android SDK directory:
After updating my Android SDK tools today to 25.3.1, the emulator won't run anymore.
I can open the AVD Manager. When I hit "Play" on one of the emulators on the list, I see the bar below on Android Studio
But then after the progress bar reaches the end, nothing happens.
I see in the release notes that the latest update brought changes to the emulator so I'm wondering if that's a bug or I'm missing something about that.
I'm using Android Studio 2.3.
Any ideas?
I ran into the same problem after upgrading. I can't figure out what's causing the configuration problem but I did figure out a workaround.
First, I tried to launch the emulator from the command line:
$ emulator #<name_avd_image>
emulator: ERROR: This AVD's configuration is missing a kernel file! Please ensure the file "kernel-ranchu" is in the same location as your system image.
emulator: ERROR: ANDROID_SDK_ROOT is defined (<android>/sdk) but cannot find kernel file in <android>/sdk/system-images/ sub directories
You can get more information if you run emulator with the -verbose flag. I tried re-installing the system image (e.g. Android API 25 x86 w/ Google APIs), Android Emulator 25.3.1, and re-creating the AVD but nothing worked.
Finally as a workaround, I just copied all of the system files from the SDK system images directory into the AVD directory:
Example: Pixel XL (Android API 25 x86 w/ Google APIs)
SOURCE: <android>/sdk/system-images/android-25/google_apis/x86/
DESTINATION: ~/.android/avd/Pixel_XL_API_25.avd/
After that the emulator started right up. It's not ideal, but this was blocking my development so I had to get the emulator up and running again. I hope someone else will be able to figure out what broke in the configuration.
UPDATE: Figured out the configuration problem!
I noticed I periodically was seeing the console error "Your emulator is out of date, please update by launching Android Studio:" so I decided to check:
$ which emulator
<$ANDROID_SDK_ROOT>/tools/emulator
With help from this thread:
The problem is there are two emulators: one in
$ANDROID_SDK_ROOT/tools, another one in
$ANDROID_SDK_ROOT/emulator. The one in $ANDROID_SDK_ROOT/tools
cannot start. Place $ANDROID_SDK_ROOT/emulator before
$ANDROID_SDK_ROOT/tools in your $PATH variable, it should fix the
problem.
NOTE: For most Mac users, you can edit your ~/.bash_profile to change these settings and then run $source ~/.bash_profile to load the updates. In my particular case, I also had old values for $ANDROID_HOME that I had to clear out.
The real problem, at least over Ubuntu 16.10 and 17.04 and Andoid Studio 2.4 Preview 7 (but could happen with any Debian derivative and previous versions of Android Studio), is that Google is distributing a non working libstdc++ library with the emulator tools. They're distributing 6.0.18 version, but i found that the working one is 6.0.22.
EDIT: There are reports that 6.0.21 version of libstdc++ works as well as 6.0.22.
So, you have 2 options:
Option 1
rm the previous non working Google's libs in /yoursdkpàth/emulator/lib64/libstdc++
Download and extract libs from libstdc++ official package in /yoursdkpàth/emulator/lib64/libstdc++
Don't try to install the .deb, extract the files/binaries from inside it (the 2 binaries are in a folder named "lib") and manuallly copy them on the recommended path.
Option 2
Create a simlink to the lib distributed with Ubuntu, which already is 6.0.22 version
cd ~/Android/Sdk/emulator/lib64/libstdc++/
mv libstdc++.so.6 libstdc++.so.6.bak
mv libstdc++.so.6.0.18 libstdc++.so.6.0.18.bak
ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ~/Android/Sdk/emulator/lib64/libstdc++/libstdc++.so.6
ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22 ~/Android/Sdk/emulator/lib64/libstdc++/libstdc++.so.6.0.22
IMPORTANT 1: As Google seems to be not aware of the problem, on every update they make to the Android Emulator package in Android Studio, they break the funcionality replacing your working SDK C++ libs with the broken/older ones. The solution is to repeat any of the above procedures.
IMPORTANT 2: This is only valid if your AVDs are configured for use your PC GPU as host for video accelaration (Hardware GLES 2.0). Selecting Sofware GLES 2.0 on your AVD will work without any of the suggested changes, but your emulator will turn painfully slow.
Have you check the Android emulator installed in the **SDK Tools?
Go to Setting-> sdk-tools.
See whether Android is installed or not.
I have face same problem. when I checked the SDK Tools, I found that the Android emulator was not installed.
The libstdc++.so.6 is the cause (as pointed out by #doruMarinau); Android Studio 2.3 moved the file to a new folder your_sdk/emulator/lib64.
If using Linux, create a symlink for it:
$ ln -sf /usr/lib/libstdc++.so.6 /your_sdk/emulator/lib64/libstdc++/libstdc++.so.6
The solution is:
Tools - Android - Sdk manager
tab Sdk tools
install emulator 25.3.1
This worked for me:
Go to AVD Manager, then, in the Actions column, click on the arrow that points dawn and select "Wipe Data".
After this, try to run the emulator.
It’s a libGL error and libstdc++ issue. Cannot launch AVD in emulator.
It’s a know bug and you can easily beat it with some simple steps.
I have tested this solution on a Ubuntu 16.10 64bit
Solution:
$adb kill-server
$adb start-server
After this start your emulator from the Android studio. If this doesn't work then go ahead for the next solution.
Alternative solution:
First, install some packages and libs:
$sudo apt-get install lib64stdc++6:i386
$sudo apt-get install mesa-utils
Second, tweak some links:
$ cd YOURPATH/Android/Sdk/tools/lib64
$ mv libstdc++/ libstdc++.bak
$ ln -s /usr/lib64/libstdc++.so.6 libstdc++
Third, relaunch your AVD device and test it.
Go to Sdk/emulator/lib64/libstdc++ move libstdc++.so.6 and libstdc++.so.6.0.18 to myfolder (I created this) (or any other location) as backup and copy libstdc++.so.6, libstdc++.so.6.0.21 from usr/lib64; try again to launch your virtual device.
It's been driving me nuts for the last few days. Here's what worked for me:
ANDROID_HOME, ANDROID_SDK_ROOT variables in "System Environment Variables" were different from Android Studio -> Settings -> Android SDK Location. So when I changed the environment variables, AVD started!
(After changed the environment variable, you should restart the Android Studio)
The only solution which worked for me, was to install following missing libraries:
$sudo apt-get install lib64stdc++6:i386
$sudo apt-get install mesa-utils
Once you have them, update the one there in sdk's emulator with these as following:
$ ln -sf /usr/lib/libstdc++.so.6 /home/[YOUR_SYSTEM_USERNAME]/emulator/lib64/libstdc++/libstdc++.so.6
Launch your emulator again and it will work just fine.
As of this release, the Android Emulator will be released separately from the SDK Tools.
so just install android Emulator using sdk tools in your android studio
My problem was ANDROID_SDK_HOME pointing to d:\.android instead of d:\. Could not find the images anymore.
I've seen many posts with a similar problem and tried many solutions but so far none have helped. This all started after I upgraded Genymotion from 2.5.2 to 2.6.0.
I'm using Android Studio 1.5.1 on Ubuntu 15.10 64 bit. The Genymotion plugin is version 1.0.7. VirtualBox is 5.0.12 r104815
When I try to start a Genymotion Emulator I get:
I have several machines defined and all do this.
However, I can start them from the Genymotion app.
One other piece of information...if I have Android Studio and Genymotion running I get the following error when I try to issue any adb command from the command line:
adb server is out of date. killing...
cannot bind 'tcp:5037'
ADB server didn't ACK
* failed to start daemon *
error:
I've tried restarting the computer, restarting Android Studio, and removing and reloading the plugin. I've also set Genymotion to use the same adb that Android Studio uses.
Any ideas? Let me know if you need more info.
Thanks,
Rich
This is actually 2 separate problems and I've found the solution for one and a workaround for the other.
Can't start Genymotion Emulator from Android Studio Plugin - I resolved this for now by reverting to Genymotion 2.5.2. I'll still need to figure out why 2.6.0 causes a problem but for now I can start emulator machines from the Android Studio plugin.
adb server is out of date - This is caused by more than one instance of adb on the machine. In my case, Android Studio was using the one in ~/Android/Sdk/platform-tools, but when I tried issuing adb commands in terminal it was using the one in /usr/bin. I'll either try creating a symbolic link in /usr/bin to point to ~/Android/Sdk/platform-tools, or I'll add ~/Android/Sdk/platform-tools to my Path environment variable.
Rich
I created an android project with the eclipse ADT from the android-bundle, and generated the apk. I downloaded and installed Genymotion with the integrated Oracle Virtualbox on my computer running Windows XP. How to run my application with Genymotion ?
If you have a genymotion emulator running ADB will detect it and give you the option to install it directly on it from eclipse. Another option is to install it through terminal by doing:
adb install myapk.apk
Before using adb from terminal remember to set up ANDROID_HOME, and add ANDROID_HOME/platform-tools to the path. Hope this helps
if you have APK than just Drag and Drop to Genymotion emulator by default it store in
/sdcard/download(its toast location where store file) go to there and manually install your APK
you can also put any file not only APK :)
This is online plugin for eclipse http://plugins.genymotion.com/eclipse
after install it you can use as native emulator.You can find icon in eclipse menu start emulator from it and run project
To deploy an application to a virtual device, use either of the following methods:
Drag and drop the application APK file into the virtual device window.
Run the following command: adb install .apk.
Download and install the application directly from the virtual device
using a web link.
I have launched an emulator with a:
android avd
(although the android developers site said do it from platform-tools, i did it from tools because the android command was there ,and not in platform-tools). Anyway the AVD manager appeared and I started one, and it launched just fine.
Then I tried to send my app to the emulator so (following the android developers instructions) I do a:
adb install /newApp.apk
the command prompt jumps to the next line and just blinks.....when i check the emulator nothing has changed...where am i going wrong???
Once you have started the emulator try
adb devices
to check if you can see it
List of devices attached
emulator-5554 device
then you can proceed with the install
adb install <path-to>/newApp.apk
Something looks strange about that path. If the apk is in the same directory you are launching the command from then you don't need that '/'. If this is a linux machine it would be './' for the same directory unless your apk is all the way up on root but that would be bad :)