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:
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
adb version
Android Debug Bridge version 1.0.39
cd /root/Android/Sdk/platform-tools
./adb version
Android Debug Bridge version 1.0.32
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
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
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.
If want to keep your system clean, you can also use Genymotion without Android Studio:
adb
. On macOS this is normally /Applications/Genymotion.app/Contents/MacOS/tools/
.export PATH=/Applications/Genymotion.app/Contents/MacOS/tools/:$PATH
to your ~/.bash_profile
or ~/.bash_rc
.(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.