blob: 271f9eab638f580b327d845016393fec38f01abf [file] [log] [blame] [view]
Googlerd1bd9d62017-09-13 21:21:50 +02001---
2layout: documentation
3title: Android and Bazel
4---
5
6# Android and Bazel
7
8This page contains resources that help you use Bazel with Android projects. It
9links to a tutorial, build rules, and other information specific to building
10Android projects with Bazel.
11
jingwen190e37b2018-11-07 07:53:19 -080012## Getting started
Googlerd1bd9d62017-09-13 21:21:50 +020013
14The following resources will help you work with Bazel on Android projects:
15
jingwen66cb8732018-04-12 19:00:34 -070016* [Tutorial: Building an Android app](tutorial/android-app.html). This tutorial
17 is a good place to start learning about Bazel commands and concepts, and how
18 to build Android apps with Bazel.
Michael Chinen7c204f62021-03-31 13:13:43 -070019* [Codelab: Building Android Apps with Bazel](https://developer.android.com/codelabs/bazel-android-intro#0).
Jingwen Chenaceca062018-07-23 08:07:29 -070020 This codelab explains how to build Android apps with Bazel.
jingwen190e37b2018-11-07 07:53:19 -080021
22## Features
23
24Bazel has Android rules for building and testing Android apps, integrating with
25the SDK/NDK, and creating emulator images. There are also Bazel plugins for
26Android Studio and IntelliJ.
27
Jingwen Chen0f4544d2018-12-14 16:28:16 -080028* [Android rules](be/android.html). The Build Encyclopedia describes the rules
jingwen1d897e22019-07-26 07:20:10 -070029 for building and testing Android apps with Bazel.
jingwen66cb8732018-04-12 19:00:34 -070030* [Integration with Android Studio](ide.html). Bazel is compatible with
31 Android Studio using the [Android Studio with Bazel](https://ij.bazel.build/)
32 plugin.
jingwen190e37b2018-11-07 07:53:19 -080033* [`mobile-install` for Android](mobile-install.html). Bazel's `mobile-install`
34 feature provides automated build-and-deploy functionality for building and
35 testing Android apps directly on Android devices and emulators.
Jingwen Chen0f4544d2018-12-14 16:28:16 -080036* [Android instrumentation testing](android-instrumentation-test.html) on
37 emulators and devices.
38* [Android NDK integration](android-ndk.html). Bazel supports compiling to
39 native code through direct NDK integration and the C++ rules.
jingwencf354632019-08-12 13:01:09 -070040* [Android build performance](android-build-performance.html). This page
41 provides information on optimizing build performance for Android apps.
jingwen190e37b2018-11-07 07:53:19 -080042
43## Further reading
44
Googler78fd06f2019-10-28 14:59:19 -070045* Integrating with dependencies from Google Maven and Maven Central with [rules_jvm_external](https://github.com/bazelbuild/rules_jvm_external).
jingwen66cb8732018-04-12 19:00:34 -070046* Learn [How Android Builds Work in Bazel](https://blog.bazel.build/2018/02/14/how-android-builds-work-in-bazel.html).