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 ([crbug](https://bugs.chromium.org/p/ch romium/issues/detail?id=620034)) | |
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 - Configuration instructions can be found [here](http://tools.android.com/tech- docs/configuration). Some suggestions: | |
37 - Launch it with more RAM: `STUDIO_VM_OPTIONS=-Xmx2048m /opt/android-studio-s table/bin/studio-launcher.sh` | |
johnme
2016/08/16 14:47:51
It seems STUDIO_VM_OPTIONS has to be a file accord
agrieve
2016/08/30 19:57:54
Might be a better idea, but looking at studio.sh,
| |
38 - Setup wizard advice: | |
39 - Choose "Standard", it then fails (at least for me) from "SDK tools director y is missing". Oh well... | |
40 - Choose "Import" and select your generated project directory | |
41 - Choose "OK" to set up gradle wrapper | |
42 - If you ever need to reset it: `rm -r ~/.AndroidStudio*/` | |
43 | |
OLD | NEW |