Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Unified Diff: docs/android_studio.md

Issue 2147223005: [Android] Add upstream version of studio doc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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*/`
+
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698