question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't launch my react-native app on my phone with adb

See original GitHub issue

Ok 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

2020-05-04_16-11

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:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

7reactions
Anzormumladzecommented, Jun 16, 2020

Try this one cd android && ./gradlew clean

0reactions
PauloHCardosoNcommented, Jan 27, 2021

Try this one cd android && ./gradlew clean

Thank you, that’s worked 💜

Read more comments on GitHub >

github_iconTop Results From Across the Web

Running On Device - React Native
1. Enable Debugging over USB​ · 2. Plug in your device via USB​ · 3. Run your app​ · Method 1: Using adb...
Read more >
I am unable to start up my React Native app on Windows ...
1 Launch the android emulator (any sdk is fine as any model) · 2 open the settings IN the emulator · 3 activate...
Read more >
How to Run React Native App On Real Device Android
1 Debug App in Real Android Device using USB Connection ; 2 Enable Debugging Over USB option ; 3 Attach your Real Device...
Read more >
React Native for Android development on Windows
To modify the app, open the MyReactNativeApp project directory in the IDE of your choice. We recommend VS Code or Android Studio. The...
Read more >
Debugging - Expo Documentation
Start your app, open the in-app developer menu, and select “Debug JS Remotely.” Configure __REDUX_DEVTOOLS_EXTENSION__ as shown here. You're now good to go!...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found