Android project helpers for Emacs.
android-mode provides commands for common Android development tasks:
- selecting Gradle modules and variants from project flavor data
- building, installing, uninstalling, testing, and running Android apps
- launching an emulator
- starting the currently built application on a connected device
With use-package and package-vc:
(use-package android-mode
:vc (:url "https://github.com/cat-emacs/android-mode")
:commands #'android-root)From a local checkout:
(add-to-list 'load-path "/path/to/android-mode")
(require 'android-mode)M-x android-gradle-buildM-x android-gradle-cleanM-x android-gradle-installM-x android-gradle-uninstallM-x android-gradle-testM-x android-runM-x android-start-appM-x android-start-emulatorM-x android-print-flavorM-x android-refresh-flavors
(setq android-mode-cache-dir (expand-file-name "android/" user-emacs-directory)
android-mode-sdk-dir "/path/to/android-sdk")ANDROID_HOME and a project local.properties sdk.dir value take precedence
over android-mode-sdk-dir.
Gradle command output is retained in buffers. Flavor discovery writes its
synchronous Gradle output to *android-gradle-log*; build, install, uninstall,
test, clean, and run tasks use Emacs compilation buffers.
Run package checks from this directory:
make install-deps
make lint
make build
make testLicensed under GPL-3.0-or-later.