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.

`npm run android` acts like `npm start`

See original GitHub issue

I would like to use connected Android device as using local network is not possible for me.

Description

So I tried npm run android but there is no difference in behaviour from npm start

Environment

Please run these commands in the project folder and fill in their results:

  • npm ls react-native-scripts: react-native-scripts@0.0.31
  • npm ls react-native: react-native@0.44.3
  • npm ls expo: expo@17.0.0 \
  • node -v: v7.8.0
  • npm -v: 4.2.0
  1. Operating system: Linux (Arch Linux)

  2. Phone Nexus 5x

  3. run npm run android

  4. See output:

8:08:40 PM: Starting packager...
8:08:55 PM: Starting Android...
8:08:57 PM: Packager started!

To view your app with live reloading, point the Expo app to this QR code.
You'll find the QR scanner on the Projects tab of the app.
...

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
gonzoramoscommented, Jul 13, 2017

Same issue here. I expect npm run android to launch the react native app on my connected Android device to my host computer. What happens is instead identical to npm start.

0reactions
joeky888commented, Mar 11, 2018

Same issue on both Windows and Linux.

I understand that Expo is trying to do something like hot-reloading,

and I understand that some of you are also developers of Expo,

but can you provide a simple way to run the app on physical device without Expo?

Also, the command npm run android is a very confusing command name.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the difference between "npm start" and "react-native ...
react-native run-android: basically it run the npm start command and then build and install the debug apk to the device.
Read more >
whitelabsapp - npm
npm run android. Like npm start , but also attempts to open your app on a connected Android device or emulator. Requires an...
Read more >
Installation - Vue Native
This works just like npm start , but also attempts to open your app in the iOS Simulator if you're on a Mac...
Read more >
Setting up the development environment - React Native
If you are already familiar with mobile development, you may want to use React Native CLI. It requires Xcode or Android Studio to...
Read more >
Running React Native Apps on Android - Instamobile
cd ~/path/to/template; npm install && react-native run-android ... which has a built-in Terminal that behaves exactly like the terminal on MacOS.
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