Development environment
Android Studio
Android Studio is the official Android IDE from Google: an IntelliJ-based editor, Gradle builds, the SDK Manager, an emulator and a documented signing and release flow.
Android Studio is the official integrated development environment for Android apps, built on the editor and developer tools of IntelliJ IDEA. It adds a Gradle-based build system, a fast emulator, one environment for every Android device, testing tools and lint, plus C++ and NDK support. A project consists of modules; an app module holds the manifests, the kotlin+java and the res folders.
One IDE, one project
The build system is Gradle, extended by the Android Gradle plugin. The same build runs from the menu and the command line, and the configuration lives in plain text files: build.gradle.kts for Kotlin (recommended) or build.gradle for Groovy.
- The module-level script declares dependencies, the IDE configures Maven Central, and build variants let one project produce several app versions.
- The editor completes Kotlin, Java and C/C++, and lint plus IntelliJ inspections run on every compile.
- Debugging uses Logcat, the Layout Inspector and adb output.
The SDK and the SDK Manager
The Android SDK is a set of separately installable packages, managed by the SDK Manager (Tools > SDK Manager) and stored under Android SDK Location. At least one platform version is required to compile, usually the latest. The SDK Tools tab typically needs:
- Android SDK Build-Tools for the APK and App Bundle, plus Platform-Tools and Command-Line Tools, including adb.
- Android SDK Platform as the compile target, and the Google USB Driver on Windows.
- The Android Emulator with an Intel or ARM system image, required to start.
On a headless Linux CI server packages come from sdkmanager, which also accepts the pending licences with sdkmanager --licenses.
The emulator and its requirements
The Android Emulator ships with the IDE and simulates Android devices, so a physical phone is not needed for every version. Each instance uses an Android Virtual Device (AVD), created in the Device Manager, defining its Android version and hardware.
- Acceleration comes from the machine: graphics acceleration for rendering, and VM acceleration for execution speed, which needs a hypervisor and a processor with virtualisation extensions (Intel VT-x or AMD-V, plus EPT or RVI). A VM-accelerated emulator cannot run inside another virtual machine, so it runs beside our Docker containers on the host.
- Documented minimums: for the emulator 16 GB RAM, 64-bit Windows 10 or higher, macOS 12 or higher, Linux or ChromeOS, and 16 GB of disk space. For Android Studio on Windows: 64-bit Windows 10, 8 GB RAM and 8 GB of free space, 16 GB of each with the emulator, a 1280x800 display and a virtualisation-capable processor; recommended are 32 GB RAM, a 32 GB SSD, 1920x1080 and a GPU with 8 GB VRAM.
- ARM-based Windows machines are unsupported; each extra AVD can need 6 GB more.
Signing and release
Every APK must be digitally signed before installation or update.
- The IDE signs debug builds with a debug.keystore certificate that lasts 30 years and is not suitable for a store.
- Build > Generate Signed Bundle/APK produces a signed Android App Bundle or APK; the .jks keystore holds the alias, passwords and validity, and at least 25 years lets one key sign updates for the app’s lifetime.
- With Play App Signing the app signing key never changes, while the upload key signs the uploaded package and can be reset.
- For automated builds the signingConfigs block reads a keystore.properties file, keeping secrets out of the build script; the output lands in build/outputs.
Further reading
At CyberElectro our own Android app is a Kotlin project with a Gradle build, developed on a Windows workstation with the SDK and an emulator, and signed for release in the same IDE.