This question already has answers here:
adb server version doesn't match this client
(41 answers)
Closed 5 years ago.
After installing the Android O preview on a test device my ADB stopped working and started giving me this error.
adb server version (36) doesn't match this client (39); killing...
adb E 03-27 08:01:55 2925 147690 usb_osx.cpp:333] Could not open interface: e00002c5
adb E 03-27 08:01:55 2925 147690 usb_osx.cpp:294] Could not find device interface
error: could not install *smartsocket* listener: Address already in use
ADB server didn't ACK
* failed to start daemon *
error: cannot connect to daemon
The only answers I have come across on this issue referred to Genymotion being out of sync with ADB but I don’t use Genymotion. Any help would be greatly appreciated. I have already wiped and reinstalled Android Studio as well as all of its tools and settings yet seem to still have this issue.
This works for me...
go to GenyMotion settings -> ADB tab
instead of Use Genymotion Android tools, choose custom Android SDK Tools and then browse your installed SDK.
In my case this error occured when I set up my environment adb path as ~/.android-sdk/platform-tools (which happens when e.g. android-platform-tools is installed via homebrew), which version was 36, but Android Studio project has Android SDK next path ~/Library/Android/sdk which adb version was 39.
I have changed my PATH to platform-tools to ~/Library/Android/sdk/platform-tools and error was solved
The main point that all the others have missed, is that you will get this error when you have a running adb process in the background. So the first step is to find it and kill it:
ps aux | grep adb
user 46803 0.0 0.0 2442020 816 s023 S+ 5:07AM 0:00.00 grep adb
user 46636 0.0 0.0 651740 3084 ?? S 5:07AM 0:00.02 adb -P 5037 fork-server server
When you find it, you can kill it using kill -9 46636.
In my case, the problem was an old version of adb coming from GapDebug. If you got this with GapDebug, get out of it and then do
adb kill-server
adb start-server
because with GapDebug in the background, when you kill the adb server, GapDebug will start its own copy immediately, causing the start-server to be ignored
I had the same problem with Android Studio - adb server version (37) doesn't match this client (39). I fixed by the following solution :
In Android Studio go to Tools -> Android -> SDK Manager
In the SDK Tools tab untick Android SDK Platform-Tools, click Apply to uninstall.
I then renamed the folder Platform-Tools to Platform-ToolsOld
Then back in the SDK Manager re-tick the Platform-Tools to re-install.
As mentioned by others here, that you could have two adb's running ... And to add to these answers from a Linux box perspective ( for the next newbie who is working from Linux );
Uninstall your distro's android-tools ( use zypper or yum etc )
# zypper -v rm android-tools
Find where your other adb is
# find /home -iname "*adb"|grep -i android
Say it was at ;
/home/developer/Android/Sdk/platform-tools/adb
Then Make a softlink to it in the /usr/bin folder
ln -s /home/developer/Android/Sdk/platform-tools/adb /usr/bin/adb
Then;
# adb start-server
I had the same error. In my case, using Appium, I had two versions of ADB
$ /usr/local/bin/adb version 36
and
$ /Users/user/Library/Android/sdk/platform-tools/adb version 39
The solution was:
be sure that your $PATH in bash_profile is pointing to: /Users/user/Library/Android/sdk/platform-tools/
stop the adb server: adb kill-server and check Appium is stopped.
delete the adb version 36 (or you can rename it to have a backup): rm /usr/local/bin/adb
start adb server: adb start-server or just starting Appium
You have two versions of ADB
$ /usr/local/bin/adb version
Android Debug Bridge version 1.0.36
Revision 0e9850346394-android
and
$ /Users/user/Library/Android/sdk/platform-tools/adb version
Android Debug Bridge version 1.0.39
Revision 3db08f2c6889-android
You could see which one your PATH is pointing to (echo $PATH) but I fixed it with a adb stop-server on one version and a adb start-server on the other.
To add yet another potential solution, Helium by Clockworkmod has it's own version of ADB built in that kept being started. Exiting the Helium Desktop application resolves the issue.
I think you have multiple adb server running, genymotion could be one of them, but also Xamarin - Visual studio for mac OS could be running an adb server, closing Visual studio worked for me
Related
I'm receiving the following error while running flutter run on some projects, however, on other projects it works fine:
(base) Nusraths-MacBook-Pro:flutter_uber_clone rahama$ flutter emulators --launch Pixel_2_XL_API_28
(base) Nusraths-MacBook-Pro:flutter_uber_clone rahama$ flutter run
Using hardware rendering with device Android SDK built for x86. If you get graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing Gradle... 0.8s
Resolving dependencies... 1.4s
Running Gradle task 'assembly debug'...
Running Gradle task 'assembly debug'... Done 9.3s
Built build/app/outputs/apk/debug/app-debug.apk.
Installing build/app/outputs/apk/app.apk... 1.9s
Error: ADB exited with exit code 1
Performing Streamed Install
ADB: failed to install /Users/rahama/development/flutter_uber_clone/build/app/outputs/apk/app.apk: Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]
Error launching the application on Android SDK built for x86.
It's just the flutter demo project, I haven't made any changes to it.
Actually, the answer lies in the error message of your question:
[ADB: failed to install /Users/rahama/development/flutter_uber_clone/build/app/outputs/apk/app.apk: Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]Error launching the application on Android SDK built for x86.]
Your Emulator is running out of space, clear its cache:
Click on AVD Manager
Wipe Data (Your Target Device )
You are set to go..
Flutter had a new update (I think last night), run flutter upgrade in the terminal and it should work fine (at least that did it for me).
Docs:
To update both the Flutter SDK and the packages that your app depends on, use the flutter upgrade command from the root of your app (the same directory that contains the pubspec.yaml file)
https://flutter.dev/docs/development/tools/sdk/upgrading
Run in terminal
$ flutter clean
and then
$ flutter pub get
and then
$ flutter packages get
then
$ flutter run
Although I don't have any other apps installed on my emulator, when I install the flutter app, I get the same error.
I found that the storage space of the emulator is indeed not enough. Because when I created the emulator, the default was only 1024M. When I changed the storage space of the emulator to 4096M, the problem was solved.
In my case, it was caused by an adb glitch, not a flutter problem.
This was solved by doing a combination of the following, not sure which step fixed it exactly
Reset adb server on desktop, macOS in mycase: adb kill-server, and then adb start-server
Reset USB debugging on the mobile device.
Restarted the device.
None of the existing answers worked for me, so it wasn't a flutter problem. A plain adb install any.apk didn't work. So I narrowed it down to an adb/usb issue.
this common problem with the Emulator and all you need to clear the Emulator cache .
in my case it was the solution...
1- open AVD Manger.
2- click on the (bottom arrow) that beside (Edit) button.
3- choose Wipe Data.
Sometimes it can work by uninstalling your app and and all it's data then try again,
another fix is to send the apk you are trying to install from projectname/build/app/outputs/apk and to your device and install it and try again.
Note: Following is answer for stuck at Performing Streamed Install by adb install xxx.apk:
phenomenon
use adb install xxx.apk and showing Performing Streamed Install but stuck, hang forever.
Have tried
re-plug USB cable
change USB adapter
change USB cable
reboot PC(Mac)
reboot android phone
restart VSCode
make adb command shorter
from: adb -s hxxxxxxxxs install -r /Users/limao/dev/xxx/crawler/appAutoCrawler/AppCrawler/task/20201202_xxx_0192LeiMoChuanShuo/20201202_xxx_0192LeiMoChuanShuo_gameApp_Android/20201202_xxx_0192LeiMoChuanShuo_gameApp_Android_0.apk
to: adb -s hxxxxxxxxs install -r /var/folders/gt/5868sbcd1jq4rxvryqhy2_1sz8n0s3/T/tmpq3ypjfgd/20201202_xxx_0192LeiMoChuanShuo_gameApp_Android_0.apk
tried adb shell pm install but not support
etc...
all not work.
Final solution
update (original old version 29.0.5) adb to latest version (30.0.5)
Q: how to update adb to latest version
A:
goto
https://developer.android.com/studio/releases/platform-tools
to download your platform adb
下载适用于 Windows 的 SDK Platform-Tools
下载适用于 Mac 的 SDK Platform-Tools
下载适用于 Linux 的 SDK Platform-Tools
or:
goto
https://www.xda-developers.com/google-releases-separate-adb-and-fastboot-binary-downloads/
to download:
windows
https://dl.google.com/android/repository/platform-tools-latest-windows.zip
Mac
https://dl.google.com/android/repository/platform-tools-latest-darwin.zip
Linux
https://dl.google.com/android/repository/platform-tools-latest-linux.zip
unzip to got folder platform-tools
add the folder to your PATH variable
eg:
vi ~/.zshrc
PATH=/Users/limao/dev/tools/android/adb/platform-tools:$PATH
In my case, this was resolved by updating android studio and all the flutter and dart plugins.
Go to File>> invalidate caches
By this way I resolved this issues on BlueStack.Do these steps for running android applications on BlueStack Emulator.
Go to setting of BlueStack Emulator
Then click on Advance and then
Turn on Android Debug Bridge (ADB)
I experienced this same problem on a physical device, tried all solution i could see out there but none worked.
What worked at the end of the day was to ensure my device API version was also installed in the android studio.
image1
image2
Forewords
This question gets the first result from Google, so my answer covers a bit different error.
The error in question has [INSTALL_FAILED_INSUFFICIENT_STORAGE] code. My answer is for any Performing Streamed Install error that does not specifically define [INSTALL_FAILED_INSUFFICIENT_STORAGE] code.
My Environment
KDE Neon 5.24 (a.k.a. Ubuntu 20.04 but latest KDE stuff)
Visual Studio Code from Snap (I use this mainly)
Android Studio from Snap (I use this to install SDK, Platform Tools and Build Tools)
Troubleshooting
The problem is this globally installed /usr/bin/adb overrides the adb that Flutter uses. As you know, Ubuntu has many outdated packages (to protect their system's stability). ADB is one of them. So, if you try to do:
adb kill-server
adb start-server
You will highly likely get an output similar to below:
* daemon not running; starting now at tcp:5037
ADB server didn't ACK
Full server startup log: /tmp/adb.1000.log
Server had pid: 12668
--- adb starting (pid 12668) ---
adb I 03-26 03:19:35 12668 12668 main.cpp:57] Android Debug Bridge version 1.0.39
adb I 03-26 03:19:35 12668 12668 main.cpp:57] Version 1:8.1.0+r23-5ubuntu2
adb I 03-26 03:19:35 12668 12668 main.cpp:57] Installed as /usr/lib/android-sdk/platform-tools/adb
adb I 03-26 03:19:35 12668 12668 main.cpp:57]
adb I 03-26 03:19:35 12668 12668 adb_auth_host.cpp:416] adb_auth_init...
adb I 03-26 03:19:35 12668 12668 adb_auth_host.cpp:174] read_key_file '/home/erayerdin/.android/adbkey'...
adb I 03-26 03:19:35 12668 12668 adb_auth_host.cpp:391] adb_auth_inotify_init...
adb I 03-26 03:19:35 12668 12668 adb_auth_host.cpp:467] Calling send_auth_response
adb server killed by remote request
* failed to start daemon
error: cannot connect to daemon
In some flutter run sessions, I've got an output similar to "adb server version (whatever) does not match the client (whatever); killing". That's when I had the doubt maybe I have installed adb globally. Check this:
which adb
# /usr/bin/adb
# This is a sign that this adb might be globally installed.
# This must be a symlink. Just to make sure, I do the following...
realpath /usr/bin/adb
# /usr/lib/android-sdk/platform-tools
# This is the evidence that it has been installed globally.
So, we use an outdated version of adb, which does not match the target device's adb server.
Solution
So, we need to get rid of this global adb first.
⚠ Warning
If you use adb from terminal, what we are going to do will remove it. You can add your {SDK PATH}/platform-tools where SDK PATH is where you have installed SDK to get it back.
Simply do:
sudo apt remove android-sdk android-sdk-common android-sdk-build-tools android-sdk-build-tools-common android-sdk-platform-tools android-sdk-platform-tools-common
However, doing these actually does not remove adb from the system. It still lays there for some reason, so, for the last step, we do:
# simply backup our symlink
sudo mv /usr/bin/adb /usr/bin/adb.bak
# and backup global android-sdk tools
sudo mv /usr/lib/android-sdk /usr/lib/android-sdk.bak
After these steps, you can restart your editor and try again. If you want to make double sure, you can optionally do (while your editor's closed):
# clean the build artifacts
flutter clean
# reinstall the packages because we have cleared them
flutter pub get
flutter pub get packages
Android 12 requires you to add a piece of code to your main activity
Go to your project folder and open the AndroidManifest.xml file
Add the below code in the activity
android:exported="true"
I was having the same issue with a physical device connected via wifi, then I figured out what was wrong. The battery of my device was below 15%, it worked as expected after charging. So, keep an eye on the battery status if you're working with a physical device via wifi.
I'm using genymotion 2.8.1 and android studio 2.3.1 and my OS is OSX 10.12.3. I have my Android SDK setup in ~/Library/Android/sdk. I've pointed genymotion to the same and my Android studio local.properties also to the same.
But when I start up genymotion device and try to run adb I just get an error saying the socket "5037" is already in use. When I run ps -ef | grep adb I get the following
505 2532 1 0 2:08PM ?? 0:00.70 adb -L tcp:5037 fork-server server --reply-fd 5
So I'm assuming this process was started by genymotion when trying to connect to the device. But when I run adb devices from the same path (I checked what path the adb process was running was from using the activity monitor) it throws this error
List of devices attached
* daemon not running. starting it now at tcp:5037 *
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 can someone clarify what is happening here ? Is this a issue with this version of Genymotion and should I try downgrading it ?
So finally after lot of mix and match I found out that the issue was with the latest ADB version. Download this older version of the platform tools for mac - platform-tools_r25.0.3
Then goto where your sdk folder is and replace the platform-tools with the extracted platform-tools from the above mentioned package. Hope this helps others facing the same issue
This question already has answers here:
adb server version doesn't match this client
(41 answers)
Closed 4 years ago.
Update (11/10/14): Genymotion has released 2.3.1 which fixes this issue. https://cloud.genymotion.com/page/changelog/#231
Update (10/21/14): Genymotion replied to my support email and indicated the solution recommended by #plackemacher below is the suggested fix at the moment. They are aware of the issue.
Since upgrading to Lollipop, I'm having adb issues when using a Genymotion emulator. Devices don't show up in Android Studio, and I've also gotten the following error when trying to run adb devices:
$ adb devices
adb server is out of date. killing...
cannot bind 'tcp:5037'
ADB server didn't ACK
* failed to start daemon *
error:
I'm not sure if it's because of the Lollipop upgrade or coincidence.
Edit/update:
Per Chris Satton's comment, I investigated if multiple adb processes were running (ps aux | grep adb), and it looks like it's a Genymotion conflict(?). It looks to include its own version of adb.
greg 72550 0.0 0.0 611164 1508 ?? S 4:14PM
0:00.02
/Applications/Genymotion.app/Contents/MacOS/player.app/Contents/MacOS/tools/adb
-s 192.168.56.102:5555 shell
greg 72523 0.0 0.0 635956 2296 ?? S 4:14PM 0:00.02 adb -P 5037 fork-server server
Try running this:
killall -9 adb
That should remove all running traces of the daemon
Edit: Best solution below
This issue may be adb incompatibility with the newest version of the platform SDK. The best solution for this issue with Genymotion is to set the Android SDK within Genymotion to your location. This can be found within the Settings page.
In my case the problem was that I have installed adb tools and fastboot using this command
sudo apt-get install android-tools-adb android-tools-fastboot
From repository, so in this case this executables goes to the /usr/bin/ directory in order that you can use it system-wide ($PATH variable).
In addition, I am running android studio with genymotion configured like in the answer above.
So when I was trying to acces adb (adb shell in my case) it was trying to start another copy of adb process (server) and bind to default port, so the problem was here.
I have just uninstalled the android-tools-adb android-tools-fastboot and added the path to my Android SDK to the $PATH variable
Using genymotion on ubuntu.
My solution was to actually use the binary instead of the PATH'd adb.
~/genymotion/tools/abd reboot
Also I have the custom SDK in genymotion.
What worked for me finally and what I think is hastle free is that you simply run the adb commands directly from platform-tools folder. For example, use ./adb devices to view the devices.
I also changed genymotion's SDK to android's default SDK but I'm not sure if it won't work without doing that.
I think ,if you want to use adb its better to use android studio emulator and test what you want, after you can use Genymotion
None of solutions helped for Ubuntu.
Just drag .apk file onto Genymotion device's screen and app will be installed.
Ubuntu 15.04, Genymotion 2.5.2
The accepted answer did not work for me, although the idea did, just with a different command:
pkill adb
I'm running ubuntu MATE 1.8.2 and Genymotion 2.6.
Add the Android SDK to the $PATH variable.
I just used ./adb reboot on Android/Sdk/platform-tools/
This question already has answers here:
adb server version doesn't match this client
(41 answers)
Closed 5 years ago.
I'm creating my first react-native project with this tutorial: http://facebook.github.io/react-native/
When it comes to executing code and running react-native run-android I am getting:
adb server is out of date. killing...
* daemon started successfully *
And the app on the android device is obviously not working.
I've reinstalled the SDK, tried to adb kill-server and adb start-server, but nothing seems to work
I'm using Android 4.4 and Ubuntu 14.04
Open Android Studio, and then update all your build tools, install the SDKs that you need for your device and ensure that have you set ANDROID_HOME env var to the same dir that you have in Android Studio (commonly in /home/you/Android/Sdk), also update react-native-cli node package. Run adb kill-server and adb start-server.
Probably you will have problems with adb version, just change your bin:
sudo cp ~/Android/Sdk/platform-tools/adb /usr/bin/adb
sudo chmod +x /usr/bin/adb
In the latest adb update the adb server is out of date. killing... message has been replaced with more informative adb server version (%d) doesn't match this client (%d)
So this solution is applicable to both.
The root cause of the error is that your system has multiple adb binaries of different versions) installed. These adb binaries may come from different sources - distributed together with some development tools or even installed from your linux distribution official repository. I would strongly advise against using any of those sources. The official source of the most recent version of adb is the platform-tools package from the Android SDK. The adb tag info page contains the direct links to the package.
So if you have Android SDK already installed - just update the platform-tools package to the latest version using SDK Manager. If not - download and unpack the contents of platform-tools.zip file for your platform to a folder. Add that folder to your $PATH. Now kill all running adb processes and make sure to find all other copies of adb and delete them. In rare cases some software might stop working. In that case you would need either change that application's internal setting telling it where to find the new binary or if the application uses hard-coded adb location - just create a symlink to the new location.
That's it. No more server/client version mismatches. Although you might need to repeat the procedure after installing another software which comes prepackaged with its own adb copy.
It might be that you installed the adb package in addition to the SDK's. In that case, a
sudo apt purge adb
might solve the problem.
I'm getting this error using ADB (1.0.32) and Genymotion (2.8.2). My solution was change the ADB of the VM, from my local Android SDK's ADB to Genymotion ADB (default).
I am working with React-Native, Android, and Genymotion on Mac. When I run react-native run-android I get this lines at the end of the launch operation:
...
04:54:40 E/adb: error: could not install *smartsocket* listener: Address already in use
04:54:40 E/adb: ADB server didn't ACK
04:54:40 E/ddms: '/Users/paulbrie/Library/Android/sdk/platform-tools/adb,start-server' failed -- run manually if necessary
04:54:40 E/adb: * failed to start daemon *
04:54:40 E/adb: error: cannot connect to daemon
:app:installDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: Timeout getting device list.
...
However, adb devices returns this:
List of devices attached
192.168.59.101:5555 device
So far I've found no solution to run my app on the emulator. Has anyone encountered the same issue?
Thanks,
Paul
After more research I've realized that Genymotion uses by default its own adb.
I switched to my main adb (the same used by react-native) and it solved the issue. I guess that because Genymotion's adb was launched first I got the Address already in use error message.
I am using genymotion, but Paul's solution alone did not fix the error (for Mac).
I had to:
Update Android SDK to the latest version (24.4.1) via the SDK manager
Type android in the command line
In the SDK manager find the latest SDK tools and install.
Once installed the SDK path should update the new SDK location like below.
Then update the $ANDROID_HOME to use the new SDK
export ANDROID_HOME=/usr/local/Cellar/android-sdk/24.4.1_1
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Confirm it has been added by viewing your path with echo $PATH
Then in genymotion do what #Paul says above and point genymotion ADB to use the same sdk
System: Windows 10
My issue: Setting Genymotion to point to the custom SDK didn't have any affect. I still received the:
Couldn't start project on Android: could not install smartsocket
listener: cannot bind to 127.0.0.1:5037: Only one usage of each socket
address (protocol/network address/port) is normally permitted. (10048)
could not read ok from ADB Server * failed to start daemon * error:
cannot connect to daemon
What I discovered was there was a difference in ADB versions being used throughout the system. Here is the command I used to find them:
where /r C:\ adb.exe
This produced the results:
C:\Program Files\Expo XDE\resources\app\node_modules\xdl\binaries\windows\adb\adb.exe
C:\Program Files\Genymobile\Genymotion\tools\adb.exe
C:\Users\kyle\AppData\Local\Android\Sdk\platform-tools\adb.exe
C:\Users\kyle\AppData\Local\Android\Sdk\platform-tools\adb backup\adb.exe
Navigating to each directory and running:
adb.exe version
Allowed me to see that Expo was running ADB version:
Android Debug Bridge version 1.0.36
Revision fd9e4d07b0f5-android
While Genymotion using the custom SDK had version (c:\Users\kyle\AppData\Local\Android\Sdk\platform-tools\adb.exe):
Android Debug Bridge version 1.0.39
Revision 3db08f2c6889-android
As a test I took the adb files (adb.exe, AdbWinApi.dll, AdbWinUsbApi.dll) from
c:\Users\kyle\AppData\Local\Android\Sdk\platform-tools\adb.exe
and placed them into a backup folder. I then moved the adb files located at
c:\Program Files\Expo XDE\resources\app\node_modules\xdl\binaries\windows\adb\adb.exe
into that same location. I killed adb with:
adb kill-server
which caused a restart of the adb server automatically due to having my Genymotion device already running. I hit the "Restart" button inside of the Expo XDE and it immediately began working. Here is the log where I hit the restart button at 1:13:04 AM:
12:45:53 AM
could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037: Only one usage of each socket address (protocol/network address/port) is normally permitted. (10048)
could not read ok from ADB Server
* failed to start daemon *
error: cannot connect to daemon
1:13:04 AM
Restarting project and clearing packager cache (Hold shift while clicking restart to avoid clearing cache).
1:13:11 AM
Starting React Native packager...
1:13:17 AM
Scanning 543 folders for symlinks in C:\Users\kyle\git\betalog\node_modules (49ms)
1:13:17 AM
1:13:19 AM
Couldn't adb reverse: closed
1:13:20 AM
Project opened! You can now use the "Share" or "Device" buttons to view your project.
1:13:26 AM
Couldn't adb reverse: closed
1:13:26 AM
Downloading latest version of Expo
1:13:28 AM
Installing Expo on device
1:13:33 AM
Opening on Android device
1:13:56 AM
Building JavaScript bundle: finished in 59643ms.
1:14:01 AM
Dependency graph loaded.
1:14:03 AM
Your JavaScript transform cache is empty, rebuilding (this may take a minute).
Conclusion: Genymotion and Expo may need to use the same version of adb so that Expo can properly communicate with the simulated device. Pointing Genymotion to your android SDK location as well as ensuring Expo XDE has that same version will allow correct communication between devices. I moved the Expo XDE version to the SDK location, but you might be able to go the other way (take the sdk ADB files and place them in the Expo XDE resource location).
P.S. I've been all through the stackoverflow posts related to this issue. Just so you guys know my task manager shows three instances of adb.exe running. If you kill any of them they just come back.
Hope this helps /cheers
Maybe your adb versions are mismatching
Check:
adb version
Then:
cd /Path/to/Android/Sdk/platform-tools && ./adb version
If these two are different you have an error here, just remove adb from sys and copy the one that is in platform-tools to /usr/bin/
the adb version on your system is different from the adb version on the android sdk platform-tools .
Below suggestion is work for me for Linux operating system
check sys adb version run the below command
adb version
Android Debug Bridge version 1.0.39
check sdk adb version
cd /root/Android/Sdk/platform-tools
./adb version
Android Debug Bridge version 1.0.32
copy
rm /usr/bin/adb
[Note : the above command remove the existing adb then copy the adb from sdk/platform-tools directory ]
sudo cp /root/Android/Sdk/platform-tools/adb /usr/bin/adb
Then run the project using this command
react-native run-android
If want to keep your system clean, you can also use Genymotion without Android Studio:
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 - execute/add the line export PATH=/Applications/Genymotion.app/Contents/MacOS/tools/:$PATH to your ~/.bash_profile or ~/.bash_rc.
Make sure that you can run adb from your terminal.
(From https://docs.expo.io/versions/latest/workflow/genymotion)
I had the same thing while I tried to run from expo UI.
Did the same things, as described in answers, but app was not running.
When once tried run exp android from command line (in the project folder), application ran successfully and next times runs from Expo UI was successfully.
I had a similar issue.
First, I uninstalled the app.
Then, I pointed GenyMotion to the android sdk provided from Android Studio
Next, I ran "adb kill-server" into the terminal.
Finally, I re-ran "react-native run-android" and got a build success.
The steps worked for me are :
$ adb kill-server
$ adb start-server
$ cd android
$ ./gradlew clean
$ cd ..
$ react-native run-android
For Ubuntu
It works for me!!
check sys adb version
adb version
Android Debug Bridge version 1.0.39
2 check sdk adb version
cd /home/user_name/Android/sdk/platform-tools
./adb version
Android Debug Bridge version 1.0.32
copy
sudo cp /home/user_name/Android/sdk/platform-tools/adb /usr/local/bin
that's all! It will work now.
1.use custom sdk path in genymotion.(Suppose this one won't work means,Try to execute the second one)
2.Manually use this command to execute(SDK PATH/adb she
ll am start -n/Package name/MainActivity).
C:\Users\AppData\Local\Android\Sdk/platform-tools/adb she
ll am start -n com.example/com.example.ManiActivity
And try to run the application by using react-native run-android.
Same issue happened when I try to run my react-native project in Genymotion
For Linux ubuntu 20.04
Go to /home/mycomputer/Android/Sdk/platorm-tools
run $./adb version
just copy the adb path in /usr/bin
$ sudo cp /home/raik/Android/Sdk/platform-tools/adb /usr/bin
Then I can run my project in genymotion.
Note: In some Linux system may be copied to this path /usr/local/bin`
If someone is facing this issue in Windows with Android Studio emulator then just run following command in powershell or cmd:
taskkill /F /IM adb.exe
It should kill all the adb process instances and then you can Reload the app or Start the App on Android again via Expo CLI.