Skip to content

Commit

Permalink
Mobile: Fix issues with development environment
Browse files Browse the repository at this point in the history
* Install missing jetifier dependency
* Add note about run-android bug to BUILD.md
  • Loading branch information
xuhcc committed Aug 1, 2019
1 parent 7f5bf13 commit 2906466
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Tools/github_oauth_token.txt
_releases
ReactNativeClient/lib/csstojs/
ReactNativeClient/lib/rnInjectedJs/
ReactNativeClient/android/app/src/main/assets/index.android.bundle
ElectronClient/app/gui/note-viewer/fonts/
ElectronClient/app/gui/note-viewer/lib.js
Tools/commit_hook.txt
4 changes: 4 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ First you need to setup React Native to build projects with native code. For thi

Then, from `/ReactNativeClient`, run `npm install`, then `react-native run-ios` or `react-native run-android`.

If app crashes with `Unable to load script` error after running `react-native run-android` on Linux, check this StackOverflow question:

https://stackoverflow.com/questions/44446523/unable-to-load-script-from-assets-index-android-bundle-on-windows/44476757

# Building the Terminal application

```
Expand Down
6 changes: 6 additions & 0 deletions ReactNativeClient/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ReactNativeClient/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"postinstall": "node ../Tools/copycss.js && node ../Tools/buildReactNativeInjectedJs.js && cd .. && npm i"
"postinstall": "node ../Tools/copycss.js && node ../Tools/buildReactNativeInjectedJs.js && npx jetify && cd .. && npm i"
},
"dependencies": {
"@react-native-community/slider": "^1.1.3",
Expand Down Expand Up @@ -80,6 +80,7 @@
"devDependencies": {
"@babel/core": "^7.4.5",
"@babel/runtime": "^7.4.5",
"jetifier": "^1.6.3",
"metro-react-native-babel-preset": "^0.54.1",
"react-test-renderer": "^16.8.3"
}
Expand Down

0 comments on commit 2906466

Please sign in to comment.