Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Android Studio | |
| 2 | |
| 3 Android Studio integration works by generating .gradle files from our BUILD.gn f iles. | |
| 4 | |
| 5 [TOC] | |
| 6 | |
| 7 ## Usage | |
| 8 | |
| 9 ```shell | |
| 10 build/android/gradle/generate_gradle.py --output-directory out-gn/Debug --target //chrome/android:chrome_public_apk | |
| 11 ``` | |
| 12 | |
| 13 This creates a project at `out-gn/Debug/gradle`. To create elsewhere: `--project -dir foo` | |
| 14 | |
| 15 ## Status (as of July 14, 2016) | |
| 16 | |
| 17 ### What currently works | |
| 18 | |
| 19 - Basic Java editing and compiling | |
| 20 | |
| 21 ### 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.
| |
| 22 | |
| 23 - Test targets (although they *somewhat* work via `--target=//chrome/android:ch rome_public_test_apk__apk`) | |
| 24 - Make gradle aware of resources and assets | |
| 25 - Make gradle aware of native code via pointing it at the location of our .so | |
| 26 - Add a mode in which gradle is responsible for generating `R.java` | |
| 27 - Add support for native code editing | |
| 28 | |
| 29 ### What's odd about our integration | |
| 30 | |
| 31 - We disable generation of `R.java`, `BuildConfig.java`, `AndroidManifest.java` | |
| 32 - Generated .java files (.srcjars) are extracted to the project directory upon project creation. They are not re-extracted unless you manually run `generate_gr adle.py` again | |
| 33 | |
| 34 ## Android Studio Tips | |
| 35 | |
| 36 - Launch it with more RAM: `STUDIO_VM_OPTIONS=-Xmx2048m /opt/android-studio-sta ble/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.
| |
| 37 - Setup wizard advice: | |
| 38 - Choose "Standard", it then fails (at least for me) from "SDK tools director y is missing". Oh well... | |
| 39 - Choose "Import" and select your generated project directory | |
| 40 - Choose "OK" to set up gradle wrapper | |
| 41 - If you ever need to reset it: `rm -r ~/.AndroidStudio*/` | |
| 42 | |
| OLD | NEW |