Chromium Code Reviews| Index: docs/android_studio.md |
| diff --git a/docs/android_studio.md b/docs/android_studio.md |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..280a7c0520268b5aaf8b99ed85d74ab608746e8a |
| --- /dev/null |
| +++ b/docs/android_studio.md |
| @@ -0,0 +1,42 @@ |
| +# Android Studio |
| + |
| +Android Studio integration works by generating .gradle files from our BUILD.gn files. |
| + |
| +[TOC] |
| + |
| +## Usage |
| + |
| +```shell |
| +build/android/gradle/generate_gradle.py --output-directory out-gn/Debug --target //chrome/android:chrome_public_apk |
| +``` |
| + |
| +This creates a project at `out-gn/Debug/gradle`. To create elsewhere: `--project-dir foo` |
| + |
| +## Status (as of July 14, 2016) |
| + |
| +### What currently works |
| + |
| + - Basic Java editing and compiling |
| + |
| +### Roadmap / what's not yet implemented |
|
agrieve
2016/07/18 16:47:28
Can you add a link to https://bugs.chromium.org/p/
jbudorick
2016/07/18 17:59:07
Done.
|
| + |
| + - Test targets (although they *somewhat* work via `--target=//chrome/android:chrome_public_test_apk__apk`) |
| + - Make gradle aware of resources and assets |
| + - Make gradle aware of native code via pointing it at the location of our .so |
| + - Add a mode in which gradle is responsible for generating `R.java` |
| + - Add support for native code editing |
| + |
| +### What's odd about our integration |
| + |
| + - We disable generation of `R.java`, `BuildConfig.java`, `AndroidManifest.java` |
| + - Generated .java files (.srcjars) are extracted to the project directory upon project creation. They are not re-extracted unless you manually run `generate_gradle.py` again |
| + |
| +## Android Studio Tips |
| + |
| + - Launch it with more RAM: `STUDIO_VM_OPTIONS=-Xmx2048m /opt/android-studio-stable/bin/studio-launcher.sh` |
|
agrieve
2016/07/18 16:47:28
Can you add a link to:
http://tools.android.com/te
jbudorick
2016/07/18 17:59:07
Done.
|
| + - Setup wizard advice: |
| + - Choose "Standard", it then fails (at least for me) from "SDK tools directory is missing". Oh well... |
| + - Choose "Import" and select your generated project directory |
| + - Choose "OK" to set up gradle wrapper |
| + - If you ever need to reset it: `rm -r ~/.AndroidStudio*/` |
| + |