Skip to content

Commit

Permalink
update android docs (keybase#23809)
Browse files Browse the repository at this point in the history
* update android docs

* Update shared/docs/android/setup.md

Co-Authored-By: Piotr Zduniak <[email protected]>

Co-authored-by: Piotr Zduniak <[email protected]>
  • Loading branch information
chrisnojima and pzduniak authored Apr 16, 2020
1 parent 63640c0 commit c8bb5d0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 29 deletions.
30 changes: 5 additions & 25 deletions shared/docs/android/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ You will already have the `sdkmanager` command line tool installed. So run:

`sdkmanager --install "ndk-bundle"` which should write to `$HOME/Library/Android/sdk/ndk-bundle` on macOS.

**Without Android Stuido**
**Without Android Studio**
You will need the Android Studio Command Line Tools to use `sdkmanager` without Android Studio.
[Download Command Line Tools](https://developer.android.com/studio/index.html#command-tools) here.

Expand Down Expand Up @@ -115,19 +115,11 @@ react-native packager running (`yarn rn-start android`).
Then run

```sh
# Build the apk.
yarn rn-build-android

# Or with gradle (inside android)
# You can also use the gradle wrapper `./gradlew` in android
gradle installDebug

yarn react-native run-android

# for storybook
gradle installStorybook
yarn react-native run-android --variant 'storybook'

# gradle tasks shows all the things you can do with gradle
gradle tasks
```

Unless you're modifying the Java files or you're modifying Go files
Expand Down Expand Up @@ -196,21 +188,9 @@ To recap, you should have run:

1. `adb devices` (should list _exactly_ one device)
1. `yarn rn-gobuild-android`
1. `yarn rn-start android`
1. `yarn rn-build-android` (or `gradle installDebug` inside android),
1. `yarn rn-push-android` (To install the apk on the device. NOTE: `gradle installDebug` does this automatically)

and have an emulator or android device connected. (i.e. `adb devices` should list _exactly_ one device)

Then you can run

```sh
yarn rn-push-android
```
1. `yarn react-native run-android`

to push the debug APK to your emulator or device, and it should
connect to the react-native packager instance on your machine. Happy
developing!
Happy developing!

### Troubleshooting

Expand Down
8 changes: 4 additions & 4 deletions shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
"rn-start": "./react-native/packageAndBuild.sh",
"rn-gobuild-ios": "./react-native/gobuild.sh ios",
"rn-gobuild-android": "./react-native/gobuild.sh android",
"rn-build-android": "rm -rf ./android/app/build && ./react-native/buildAndroid.sh debug",
"rn-push-android": "./react-native/pushAndroid.sh debug",
"rn-build-storybook-android": "rm -rf ./android/app/build && ./react-native/buildAndroid.sh storybook",
"rn-push-storybook-android": "./react-native/pushAndroid.sh storybook",
"rn-build-android": "echo deprecated, see docs!! && rm -rf ./android/app/build && ./react-native/buildAndroid.sh debug",
"rn-push-android": "echo deprecated, see docs!! && ./react-native/pushAndroid.sh debug",
"rn-build-storybook-android": "echo deprecated, see docs!! && rm -rf ./android/app/build && ./react-native/buildAndroid.sh storybook",
"rn-push-storybook-android": "echo deprecated, see docs!! && ./react-native/pushAndroid.sh storybook",
"rn-packager-wipe-cache": "watchman watch-del-all && rm -rf node_modules && yarn && node ./react-native/wipe-cache.js",
"rn-test-ios": "xcodebuild test -project ./ios/Keybase.xcodeproj -scheme 'Keybase For Test' -destination 'platform=iOS Simulator,name=iPhone 6s,OS=9.3'",
"rn-jsbuild-ios": "mkdir -p ios/dist && react-native bundle --platform ios --dev false --entry-file index.ios.js --bundle-output ios/dist/main.jsbundle --sourcemap-output ios/dist/main.jsbundle.sourcemap",
Expand Down

0 comments on commit c8bb5d0

Please sign in to comment.