Node/ReactNative: Difference between revisions
< Node
Jump to navigation
Jump to search
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
== Android == | |||
<source lang="bash"> | <source lang="bash"> | ||
react-native | npx react-native run-android | ||
</source> | </source> | ||
<source lang="bash"> | <source lang="bash"> | ||
cd android | |||
./gradle clean | |||
cd .. | |||
npx react-native run-android | npx react-native run-android | ||
</source> | </source> | ||
== iOS == | == iOS == | ||
| Line 20: | Line 18: | ||
* Select '''Generic Device''' or '''Menu''' > '''Product''' > '''Destination''' > '''Generic Device''' | * Select '''Generic Device''' or '''Menu''' > '''Product''' > '''Destination''' > '''Generic Device''' | ||
* Select '''Menu''' > '''Product''' > '''Archive''' | * Select '''Menu''' > '''Product''' > '''Archive''' | ||
<source lang="bash"> | |||
react-native bundle \ | |||
--entry-file index.js \ | |||
--platform ios \ | |||
--dev false \ | |||
--bundle-output ./ios/bundle/index.ios.jsbundle \ | |||
--assets-dest ./ios/bundle | |||
</source> | |||
== Trouble Shooting == | == Trouble Shooting == | ||
| Line 27: | Line 34: | ||
</source> | </source> | ||
Delete folder '''android/app/build'''. | === A === | ||
* Delete folder '''android/app/build'''. | |||
=== B === | |||
* Delete repository and clone again. | |||
* npx react-native run-android | |||
* Accept notification of firewall settings. | |||
Latest revision as of 04:17, 9 September 2020
Android
npx react-native run-android
cd android
./gradle clean
cd ..
npx react-native run-android
iOS
- Open Xcode
- Open Workspace
- Select Generic Device or Menu > Product > Destination > Generic Device
- Select Menu > Product > Archive
react-native bundle \
--entry-file index.js \
--platform ios \
--dev false \
--bundle-output ./ios/bundle/index.ios.jsbundle \
--assets-dest ./ios/bundle
Trouble Shooting
> Task :app:generateDebugBuildConfig FAILED
A
- Delete folder android/app/build.
B
- Delete repository and clone again.
- npx react-native run-android
- Accept notification of firewall settings.