---
title: Generating Android Apps using AI with Cursor Editor
url: https://calvin.my/posts/generating-android-apps-with-ai-using-cursor-editor
published: 2025-04-06
updated: 2026-09-17
category: AI
tags:
- cursor
- Android
- vibe coding
summary: The post demonstrates using Cursor’s AI composer to generate an Android Kotlin app from a natural-language specification. After creating a blank Android Studio project and opening it in Cursor, the author prompts the tool to build a 4x4 tic-tac-toe game with screens, rules, turn handling, and win dialogs. The generated project initially contains a manifest error, illustrating the need to test AI-produced code and either manually correct issues or ask the AI to fix them.
---

# Generating Android Apps using AI with Cursor Editor

## Pre-requisites

1. [Cursor Editor](https://www.cursor.com/) is installed.

2. [Android Studio](https://developer.android.com/studio) is installed, with the latest Android SDK.

3. An Android Virtual Device is created.

* * *

## In Android Studio

1. Create a blank Android app.

   ![](https://camy-pub.s3.ap-southeast-1.amazonaws.com/1e6addd9-5b9d-4bac-85a7-343643a80dcf.png)

2. Let the gradle sync and indexing process complete.

3. (Optionally) Git init and create a baseline version.

4. Close Android Studio.

* * *

## In Cursor Editor

1. Open the project directory that contains your Android App.

   ![](https://camy-pub.s3.ap-southeast-1.amazonaws.com/09e18a94-9249-4eec-a072-60f59abb174e.png)

2. Use CMD + SHIFT + I to launch the AI composer.

3. Provide the prompt in the AI composer, such as:

   ```markup
   @codebase Creating 4x4 tic tac toe game

   Package Name: my.calvin.mygame
   Language: Kotlin
   Android: 30 and above

   1) The user sees a landing screen that contains two buttons – New Game and Instruction
   2) The instruction button shows a popup that describes the rules of the game.
   3) The new game button shows the game screen – a 4x4 board, with a total of 16 boxes.
   4) Two players (white and black) take turns tapping on the 4x4 board to occupy the box. 
   5) Boxes that are already occupied cannot be tapped again.
   6) The first player that occupies 4 boxes horizontally, vertically, and diagonally wins the game.
   7) When a player wins, a dialog box pops up to announce the winner and total moves.
   8) Closing the dialog box to go back to the landing screen.
   ```

4. Click "send".

   ![](https://camy-pub.s3.ap-southeast-1.amazonaws.com/6337a169-4a18-439e-b8a3-aa27e971db3c.png)

5. After \~5min, the process is completed, several files are modified and several others are created. Click "Accept All" to save them.

   ![](https://camy-pub.s3.ap-southeast-1.amazonaws.com/3879b7b3-88b5-4190-b918-b97f99f46d45.png)

* * *

## Test our App

1. Back to Android Studio and open the app again.

2. Click the "Play" button to run the app on a Virtual Device.

3. The build process fails with an error.

   ```markup
   unexpected element <activity> found in <manifest>
   ```

4. The updated manifest file did not close the \<application\> tab correctly.

   ![](https://camy-pub.s3.ap-southeast-1.amazonaws.com/84b99759-4afe-443c-a902-6dd95d484420.png)

5. A quick modification is done, and we move the closing after the activities.

   ```xml
       <activity
           android:name=".GameActivity"
           android:exported="false" />
       </application>

   </manifest>
   ```

6. Now the app runs successfully.

   ![](https://camy-pub.s3.ap-southeast-1.amazonaws.com/51ab7e77-9213-4674-b6b2-5cdca3ebe338.png)

7. But what if you are not an Android developer (or you are not a developer)?

   You can ask Cursor to fix it for you too! For example:

   ![](https://camy-pub.s3.ap-southeast-1.amazonaws.com/d5a36285-d0c7-494e-9c28-f5fd252cea34.png)

* * *

## Screenshots of the Game Play

![](https://camy-pub.s3.ap-southeast-1.amazonaws.com/0de923aa-ac02-4efa-a2b5-b980450d1e05.png)

![](https://camy-pub.s3.ap-southeast-1.amazonaws.com/0521b3ad-0d6a-4aa1-b25b-c95c515814d8.png)
