Skip to content

How to Build an Android App on Antigravity

Read the Portuguese translation →

Author: Google Antigravity · Watch on YouTube

Video authored by the channel shown, not by IANIA; all rights belong to the creator. Transcript and summary generated automatically; the original-language content is preserved.

Original language: English

Original video: How to Build an Android App on Antigravity · Channel: Google Antigravity · 04:17 · Watch on YouTube

Topics: AI agents, Software engineering with AI, AI developer tools

The video demonstrates how to build a native Android music theory learning app using Stitch, Anti-Gravity, and the Build with Google Android CLI plugin. It shows how to generate and export app screens in Stitch, connect Stitch to Anti-Gravity through MCP, and give the agent the context and tools it needs to build the app. The agent runs the app in an emulator, uses native Jetpack Compose views, and verifies its screens through emulator interactions. Finally, the video shows how to run and test the app on a connected physical device.

  • The example app teaches users notes, scales, and chords.
  • Stitch can compose the app’s screens from an abstract prompt, and the screens can be refined before export.
  • The video selects four mobile screens in Stitch and exports them for use in Anti-Gravity.
  • Setting up the Stitch MCP server lets the Anti-Gravity conversation access the Stitch MCP tool.
  • The Build with Google Android plugin provides skills that help the agent use the Android CLI and find debugging guidance.
  • The prompt asks the agent to build an Android application using the Stitch screens and run it on the emulator.
  • The presenter steers the agent to use native views instead of a web view.
  • The agent verifies the app by taking screenshots and sending tap commands to the emulator.
  • The resulting app uses real Jetpack Compose views and can be further customized with prompts.
  • A connected phone can run the app after USB debugging is enabled.
Start Chapter Summary
00:00 Introducing the Android app workflow The presenter outlines a music theory app and the plan to design it in Stitch, build it in Anti-Gravity, and run it on a device.
01:04 Exporting screens and configuring tools The video exports four Stitch screens, sets up the Stitch MCP server, and downloads the Build with Google Android plugin.
02:10 Building and verifying the app The presenter sends the screens and build instructions to the agent, which launches the emulator and builds the application with native views.
03:14 Testing on an emulator and a real device The video shows the agent verifying the app, testing its Jetpack Compose screens, and running it on a connected phone.

Today, we’re going to be building a music theory app that lets you learn notes, scales, and chords. — 00:00

we want to proceed with the first four mobile screens. — 01:04

Here, we’re just steering the agent to use native views instead of a web view. — 02:42

These are using real Jetpack Compose views — 03:45

And just like that, we were able to build our first Android application using anti-gravity, Stitch, and the Build with Google Android CLI plugin. — 04:17

Antigravity, Stitch, MCP, Android CLI, Build with Google Android plugin, Jetpack Compose, Android emulator

00:00 Today, I want to walk through how you can build an Android application all inside of Anti-Gravity using tools like Stitch as well as the Android CLI. We also have [music] a lot of rich tools from the Google ecosystem and other things that you can find out in the Build with Google section as well as the MCP marketplace. Today, we’re going to be building a music theory app that lets you learn notes, scales, and chords. We’re going to start in Stitch with the designs. We’re going to then going to bring it into Anti-Gravity to build out the screens as real native components, and then finally, we’re going to run it on a real device. Now, I can open up Stitch. This is where we can give the

00:33 idea for the application in an abstract form. You can do this in any order, whether you’re starting in Anti-Gravity and then bringing the screens in later [music] or starting with Stitch and then giving it to the agent to build. Here, we have the prompt for our application, which is a music theory learning application where the user learns notes, [music] scales, and chords. And we can just kick this off to Stitch to have it start building and composing our screens, and we can decide if we want to refine it further or bring them right to the agent. The first step is just going to ask us to [music] confirm which screens we want to build, and we can go ahead

01:04 and say we want to proceed with the first four mobile screens. Here, we can see the agent building out the screens as well as each of the individual elements. We can see now that all the screens are complete, and we have a nice overview of the different high-level screens that will be added to the application. We can then select all four screens and click export. You can go down to MCP, click set up MCP, and you’ll see Anti-Gravity [music] in the drop-down. We can copy this to our agent and go back to Anti-Gravity, and we can say, [music] “Set up the Stitch MCP server.”

01:37 Here, the agent is adding the MCP server to our global MCP registry inside of Anti-Gravity. This allows this conversation to be able to access the Stitch MCP tool. The next step is going to be to add the Build [music] with Google Android plugin inside of Anti-Gravity. We can do that by going into our project settings, going into customizations, scrolling to the bottom, and we can see this Build with Google plugin section. We can see Anti-Gravity here at top, and we can click download. By clicking download inside the Build with Google plugins for Android, we’re going to download the skills that are needed to be able to call the Android CLI. This

02:10 gives the agent context about how to call the various parts of the Android ecosystem, as well as places to look when it needs to debug various things. Then, we can close and get back to [music] our prompt. We can go back to Stitch, and now that we have the MCP set up, [music] we can copy the prompt. Going back to Anti- to Gravity, we can [music] paste in that prompt, which just gives Anti-Gravity the context for which screens it needs to pull [music] using the MCP tools that we just added. We then can add a prompt at the bottom that says, “Build an Android application using [music] these screens, and run it on the emulator.” We then can just send

02:42 it off to our agent, and it’ll start building the app in the background. Here, it’s going to ask us to approve the tool, which we can do and allow it inside [music] of our project. And we can see that it launched the Android emulator, which we can move over to the side. We can see that Anti-Gravity has launched a Hello World application on the emulator already. Here, we’re just steering the agent to use native views instead of a web view.

03:14 Here, we can see Anti-Gravity verifying the Android application by taking screenshots and sending commands to the emulator to tap on the various tabs [music] inside the application. Here, we can see the final overview that Anti-Gravity has put together. It includes all the screens that it pulled from Stitch, grabbing both the HTML and the images that it used as input, and a deep dive into what it actually built. We can test out the application on the Android emulator by clicking around and seeing that it does, in fact, work, and we can

03:45 >> [music] >> test out a couple different things here. These are using real Jetpack Compose views, and we can customize this further by giving it further prompts to the agent to build for us. When you’re building Android applications inside of Anti-Gravity, and you want to deploy it on a real device, all you have to do is plug in your phone and you’ll be prompted to enable USB debugging if you haven’t done that before. We can then ask the agent to run the application on a connected real device. And as you can see, we can tap around

04:17 and play with it just like we did inside the Android emulator. We can even take [music] the quiz that we saw earlier. And just like that, we were able to build our first Android application using anti-gravity, [music] Stitch, and the Build with Google Android CLI plugin. Hopefully, this is just the start of your journey with building with Android applications using anti-gravity. There is so much to explore with the Android ecosystem, so make sure to check out the Android developer documentation. We cannot wait to see what you’ll build.