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
This commit is contained in:
Martin Konicek 2016-02-08 15:24:23 -08:00 committed by facebook-github-bot-7
parent 843b556769
commit abdca047b0
2 changed files with 13 additions and 9 deletions

View File

@ -7,7 +7,7 @@ permalink: docs/android-setup.html
next: linux-windows-support
---
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.
This guide describes basic steps of the Android development environment setup that are required to run React Native android apps on an android emulator.
### Install Git
@ -19,7 +19,7 @@ This guide describes basic steps of the Android development environment setup th
- **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.
### Install the Android SDK (unless you have it)
### Install the Android SDK (unless you already have it)
1. [Install the latest JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
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
You will also need to run the command `adb reverse tcp:8081 tcp:8081` with this emulator.
Then restart the emulator and when it runs you can just do `react-native run-android` as usual.
### Editing your app's Java code in Android Studio
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.

View File

@ -27,14 +27,14 @@ public class MainActivity extends ReactActivity {
return BuildConfig.DEBUG;
}
/**
* A list of packages used by the app. If the app uses additional views
* or modules besides the default ones, add more packages here.
*/
/**
* A list of packages used by the app. If the app uses additional views
* or modules besides the default ones, add more packages here.
*/
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage()
);
return Arrays.<ReactPackage>asList(
new MainReactPackage()
);
}
}