Filip Egeric
Filip Egeric

Reputation: 113

Install react-native app on android

How can I install react-native app on my android device locally, without publishing anything to Play Store. The app was created with create-react-native-app command?

Upvotes: 3

Views: 4287

Answers (3)

G.L
G.L

Reputation: 101

In your terminal

  • cd android
  • ./gradlew clean
  • ./gradlew assembleRelease (whatever build you have e.g. assembleDebugRelease)

Once all green (no failure), plug your device. Make sure developer option is enabled. Authorized your phone (usually a popup will show in the phone asking to allow). Then back to your terminal

  • adb devices --> this shall show all of the devices attached
  • npx react-native run-android --deviceId=DEVICE_ID --> deviceId is from the adb devices

E.g.

List of devices attached

A123456 device

emulator-123 device

Upvotes: 0

Aravind S
Aravind S

Reputation: 2395

For installing your app locally on mobile, follow these steps

  1. Enable developer mode in mobile.For android refer here

  2. Connect your android phone to your system.

  3. Follow these steps in CMD to enable platform-tools. Note: path may differ
    cd C:\Users\YourFolderName\AppData\Local\Android\Sdk\platform-tools
    adb devices
    adb reverse tcp:8081 tcp:8081

4.Once your run adb devices you can see your device in the list.

5.run your app in CMD anf App will get installed in your Mobile and check it out.

Let me know does it worked

Upvotes: 0

PRERNA GUPTA
PRERNA GUPTA

Reputation: 49

use

npm run android

For more information, see this:-

https://github.com/react-community/create-react-native-app#npm-run-android

Upvotes: -1

Related Questions