Android Studio for Platform (ASfP) is the recommended integrated development environment (IDE) for developing the Android platform, including Android Automotive Operating System (AAOS) Software Defined Vehicle (SDV) projects. ASfP provides a rich set of tools for code editing, building, debugging, and testing, including:
- AI-powered assistance (Gemini)
- Rust, C or C++, Java language support
- Useful integrations for AAOS SDV development (for example, Cuttlefish emulator support and VSIDL language support)
Install Android Studio for Platform
To install ASfP:
Download Android Studio for Platform.
Choose the version that best suits your needs:
- Stable: The latest production release, recommended for most users
- Canary: Early access builds with the newest features, but potentially less stable
Follow the installation instructions provided on the download page.
Set up an AAOS SDV project
To set up an AAOS SDV project:
Verify you have access to the AAOS SDV source code repository and have initialized and synced your local checkout. See Download, build, and run for details on accessing the source and initializing the repository.
Launch Android Studio for Platform.
If you are a first-time user, follow the Setup Wizard to customize the development environment.
Create a new project:
- If you don't have a project open, click New on the Welcome screen.
- If you already have a project open, click Open or select ASfP > Project > Import ASfP Project from the menu.
Fill in the project configuration details in the wizard:
Repo checkout: Specify the absolute path to the root of your local AAOS SDV source code checkout (for example,
/path/to/sdv_source).lunch target: Enter the appropriate lunch target for AAOS SDV development on Cuttlefish, for example,
sdv_core_cf-trunk_staging-userdebug. See Choose a target for more available targets.Project sources: List the initial directories or modules you want to include in your project or click the folder icon to open the file system browser to select the directories. Selecting too many directories or modules affects indexing and search performance of the IDE, so include only relevant directories or modules.
Language support: Select Rust and C++ as supported languages.
Project name: Give your project a descriptive name.
Finish setup: Click Finish. ASfP creates the project structure and
.asfp-projectconfiguration file.
ASfP automatically starts an initial sync process. ASfP analyzes your source code, resolves dependencies using the Soong build system, and builds the information needed for code intelligence features. This can take a significant amount of time, especially for the first sync.
Customize the project
The .asfp-project file in your project root allows for further customization.
You can edit this file to:
- Add or remove directories and modules.
- Enable support for other languages, such as C++ or Rust (Java and Kotlin are default).
- Configure build flags.
To make changes to the config file, select ASfP > Project > Open Config. See Projects overview for the available config options.
Debug and test
To debug and test code in ASfP, see Debug platform code and Test platform code with atest.
Available integrations
ASfP comes with some useful integrations for AAOS SDV development, including support for Cuttlefish and Language Server Protocol (LSP) in VSIDL.
Cuttlefish plugin
The Cuttlefish plugin lets users create and run local Cuttlefish devices directly from ASfP.
Install plugin
The Cuttlefish plugin is preinstalled with ASfP and requires no setup. The plugin requires Cuttlefish tools to be installed on the device. Follow the instructions to install the Cuttlefish tools if needed.
Create Cuttlefish device
To create a new device:
Open the Device Manager tool window by selecting Tools > Device Manager or by clicking the Running Devices icon on the right panel if the Device Manager is already pinned there.
Click the + icon and select Create Cuttlefish Device.
Configure the new Cuttlefish device. You can create Cuttlefish devices in two ways:
From local Android source tree checkout:
- Select the path to the built target that corresponds to your launch configuration (see Choose a target for more details).
- Select the host path.
- Optionally, select the available device configurations or None for default configuration.
From canonical configuration (use this option to create multiple devices from the single configuration):
- Select the path to the device configuration.
- Optionally, provide any override flags to override configuration options.
Wait for the Cuttlefish device to be created and added to the list of the running devices in Device Manager.
Select the Cuttlefish device from the Running Devices menu.
You can start or stop individual Cuttlefish devices by clicking the stop or start icon next to the device in the Device Manager.
Access Cuttlefish device page
The Cuttlefish plugin has a tool window that displays the Cuttlefish Device page, where you can access the screen mirroring features.
To open the Cuttlefish tool window, click the ... icon on the left side panel and select Cuttlefish. Alternatively, you can search for Cuttlefish in Help > Find Action menu item.
Language Server Protocol in VSIDL
In VSIDL, the LSP provides a rich set of IDE features to improve your
development workflow when working with VSIDL files (with a .vsidl extension)
in ASfP.
Semantic syntax highlighting
The LSP server provides syntax highlighting based for VSIDL files.
What it does: Highlights keywords (
service_bundle,publisher), fields (package:,message:), and literals.How to try: Open any VSIDL file. The file is color coded to distinguish structural keywords from user-defined identifiers.
Live diagnostics (errors and warnings)
The LSP server continuously validates files and reports issues in real time.
What it does: Detects syntax errors, invalid type references, and other errors across the entire catalog and its dependencies.
How to try: Introduce a typo in a message name (for example,
TiiirePressure). A red squiggly line appears under the misspelling. Hover over the word to see the error message, or view the full list in the Problems tool window at the bottom of the IDE.
Navigation and intelligence
You can use navigation and intelligence features to explore the relationships between different parts of your VSIDL catalog.
Autocompletion: Press Control+Space to see suggestions for keywords, protobuf messages, RPC services, topics, and channels. Keyword suggestions include short, helpful explanations of their purpose directly in the completion menu. The LSP also provides smart snippets for blocks like
publisherorserverto speed up your workflow.Go to a definition: Hold Control and click (or press Control+B) a message, service, topic, or channel reference to jump directly to its source definition, even if it's in a different VSIDL or protobuf file.
Find references: Place your cursor on the
publisher,subscriber,server, orclientkeyword and press Alt+Shift+F7 to find all occurrences.Hover information: Move your cursor to a type or property (or press Control+Q). A tooltip appears showing its documentation comments (if any exist).
Structural features
The LSP server helps you manage and navigate the structure of large VSIDL files:
Document symbols (outline): Press Control+F12 for a quick navigation tooltip, or open the Structure tool window (Control+Alt+7) to see a tree view of all bundles and units in the file.
Folding ranges: Click the > or V icons in the gutter (next to line numbers) to collapse or expand large logical blocks like
service_bundleor mapping definitions.Document formatting: Press Control+Alt+L to automatically reformat the file, creating consistent indentation and spacing.