Reputation: 113
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
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 attachednpx react-native run-android --deviceId=DEVICE_ID
--> deviceId is from the adb devicesE.g.
List of devices attached
A123456 device
emulator-123 device
Upvotes: 0
Reputation: 2395
For installing your app locally on mobile, follow these steps
Enable developer mode in mobile.For android refer here
Connect your android phone to your system.
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:80814.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
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