Can't launch my react-native app on my phone with adb
See original GitHub issueOk so here’s the situation.
I’m working on an application in react-native.
So far, I used my phone to see how it works.
using react-native start
then react-native run-android
But when i do react-native run-android
here is what I get
My environmment infos:
System: OS: Linux 5.3 Ubuntu 19.10 (Eoan Ermine) CPU: (4) x64 Intel® Core™ i7-6500U CPU @ 2.50GHz Memory: 119.08 MB / 7.66 GB Shell: 5.7.1 - /usr/bin/zsh Binaries: Node: 12.16.3 - /usr/bin/node Yarn: Not Found npm: 6.14.4 - /usr/bin/npm Watchman: Not Found SDKs: Android SDK: Not Found IDEs: Android Studio: Not Found Languages: Java: 11.0.7 - /usr/bin/javac Python: 2.7.17 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.11.0 => 16.11.0 react-native: 0.62.2 => 0.62.2 npmGlobalPackages: react-native: Not Found
I tried to do adb kill-server
and adb devices
. It works and when I do so, in the list of devices there is my phone.
But for some reasons, when it come to react-native run-android
it won’t work.
I can install the app with react-native run-android
when I first boot my computer, but react-native start
will gave me the 8081 port error.
I followed the steps as said in the documentation:
- sudo lsof -i :8081
- kill -9 <PID>
It’s at this moment that I can’t run react-native run-android
.
The most disturbing thing is that a few hours ago, it worked perfectly. How can I fiw this problem ?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Try this one
cd android && ./gradlew clean
Thank you, that’s worked 💜