aboutsummaryrefslogtreecommitdiffhomepage
path: root/site
diff options
context:
space:
mode:
authorGravatar djsollen <djsollen@google.com>2015-07-24 13:15:58 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-24 13:15:59 -0700
commitd18b861061253c8691949379546a7f96c9e251c9 (patch)
tree205731c911992c2bb60acce4871213f488c6b8f0 /site
parent1818acb6a4b11cd9a1d44ce5dde77452502a9796 (diff)
Update Android Apps to use gradle
This CL replaces ant with gradle for the task of building APKs. The primary driver of this change is that it now allow us to develop and test our apps using Android Studio. DOCS_PREVIEW= https://skia.org/?cl=1215023017 Committed: https://skia.googlesource.com/skia/+/425535f1626932e4e22f61a2571f9c3c2b1c5977 Review URL: https://codereview.chromium.org/1215023017
Diffstat (limited to 'site')
-rw-r--r--site/user/quick/android.md35
1 files changed, 25 insertions, 10 deletions
diff --git a/site/user/quick/android.md b/site/user/quick/android.md
index 44e3161c40..57d45d5259 100644
--- a/site/user/quick/android.md
+++ b/site/user/quick/android.md
@@ -10,20 +10,12 @@ _Currently we only support building Skia for Android on a Linux or Mac host! In
The following libraries/utilities are required in addition to those needed for a standard skia checkout:
- * Apache Ant
* The Android SDK: http://developer.android.com/sdk/
-~~~~
-$ sudo apt-get install ant git
-~~~~
-
Check out the source code
-------------------------
-Follow the instructions [here](../download) for downloading the Skia source. Modify .gclient to add the following line to
-the bottom, and then run gclient sync again:
-
- target_os = ["android"]
+Follow the instructions [here](../download) for downloading the Skia source.
Inside your Skia checkout, `platform_tools/android` contains the Android setup
scripts, Android specific dependencies, and the Android Sample App.
@@ -63,6 +55,7 @@ the -d option plus any of the options or arguments you would normally pass to
ninja (see descriptions of some of the other flags here).
export ANDROID_SDK_ROOT=/path/to/android/sdk
+ export ANDROID_HOME=/path/to/android/sdk
export PATH=$PATH:/path/to/depot_tools
cd skia
@@ -135,7 +128,7 @@ Build and run SampleApp
The SampleApp on Android provides a simple UI for viewing sample slides and gm images.
- BUILDTYPE=Debug ./platform_tools/android/bin/android_ninja -d $TARGET_DEVICE
+ BUILDTYPE=Debug ./platform_tools/android/bin/android_ninja -d $TARGET_DEVICE SampleApp_APK
Then, install the app onto the device:
@@ -155,6 +148,28 @@ params...
--resourcePath /data/local/tmp/skia_resoures
--pictureDir /data/local/tmp/skia_skp
+
+Android Studio Support
+-----------------------
+
+You can also build and run SampleApp (and some other experimental apps) using Android
+Studio. To create the project either select "import project" from the quickstart
+screen or use File -> Open. In both cases you'll need to select ./platform_tools/android/apps
+as the root directory of your project.
+
+Finally to be able to build within Android studio it needs to know the path to
+ninja so you will need to add a properties file and populate it with the path
+to depot_tools. The syntax and location of that file is...
+
+ #
+ # file location: ./platform_tools/android/apps/gradle.properties
+ #
+ depot_tools.dir=<path_to_depot_tools>
+
+That should be all the setup you need. You should now be able to build and deploy
+SampleApp on ARM, Intel, and MIPS devices.
+
+
Build tools
-----------