Skip to content

Commit abdca04

Browse files
Martin Konicekfacebook-github-bot-7
authored andcommitted
Add a note about Android Studio to docs, fix formatting
Summary: We should use 4 spaces of indentation in the MainActivity template as this is the most common setting outside fb. public Reviewed By: bestander Differential Revision: D2911952 fb-gh-sync-id: 3b5285945f0033d7342348b7a7cbafa32809f7dc shipit-source-id: 3b5285945f0033d7342348b7a7cbafa32809f7dc
1 parent 843b556 commit abdca04

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

docs/DevelopmentSetupAndroid.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ permalink: docs/android-setup.html
77
next: linux-windows-support
88
---
99

10-
This guide describes basic steps of the Android development environment setup that are required to run React Native android apps on an android emulator. We don't discuss developer tool configuration such as IDEs here.
10+
This guide describes basic steps of the Android development environment setup that are required to run React Native android apps on an android emulator.
1111

1212
### Install Git
1313

@@ -19,7 +19,7 @@ This guide describes basic steps of the Android development environment setup th
1919

2020
- **On Windows**, download and install [Git for Windows](https://git-for-windows.github.io/). During the setup process, choose "Run Git from Windows Command Prompt", which will add Git to your `PATH` environment variable.
2121

22-
### Install the Android SDK (unless you have it)
22+
### Install the Android SDK (unless you already have it)
2323

2424
1. [Install the latest JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
2525
2. Install the Android SDK:
@@ -95,3 +95,7 @@ To use it with react-native you just have to add a key and value to your registr
9595
You will also need to run the command `adb reverse tcp:8081 tcp:8081` with this emulator.
9696

9797
Then restart the emulator and when it runs you can just do `react-native run-android` as usual.
98+
99+
### Editing your app's Java code in Android Studio
100+
101+
You can use any editor to edit JavaScript. If you want to use Android Studio to work on native code, from the Welcome screen of Android Studio choose "Import project" and select the `android` folder of your app.

local-cli/generator-android/templates/package/MainActivity.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ protected boolean getUseDeveloperSupport() {
2727
return BuildConfig.DEBUG;
2828
}
2929

30-
/**
31-
* A list of packages used by the app. If the app uses additional views
32-
* or modules besides the default ones, add more packages here.
33-
*/
30+
/**
31+
* A list of packages used by the app. If the app uses additional views
32+
* or modules besides the default ones, add more packages here.
33+
*/
3434
@Override
3535
protected List<ReactPackage> getPackages() {
36-
return Arrays.<ReactPackage>asList(
37-
new MainReactPackage()
38-
);
36+
return Arrays.<ReactPackage>asList(
37+
new MainReactPackage()
38+
);
3939
}
4040
}

0 commit comments

Comments
 (0)