Build Android Apps with Kivy Python: Complete Tutorial

Logan Jul 13, 2026

Kivy, an open-source Python library, has emerged as a powerful tool for creating cross-platform, responsive applications. Notably, Kivy's compatibility with Android makes it an excellent choice for developing mobile apps. This tutorial will guide you through creating a simple Android application using Kivy and Python.

| Pythonista Planet
| Pythonista Planet

Before we dive in, ensure you have Python 3 installed, along with Kivy and its dependencies. You can install Kivy using pip: `pip install kivy`. Also, you'll need Buildozer, a tool for packaging Python software for Android, which you can install via `pip install buildozer`.

Navbar With Icons with KivyMD - Python Kivy GUI Tutorial #46
Navbar With Icons with KivyMD - Python Kivy GUI Tutorial #46

Setting Up Your Development Environment

First, you need to create a new directory for your project and navigate into it:

Build a Mobile Application With the Kivy Python Framework – Real Python
Build a Mobile Application With the Kivy Python Framework – Real Python

```bash mkdir my_kivy_app cd my_kivy_app ```

Initializing Your Project with Buildozer

Kivy Python
Kivy Python

Next, initialize your project with Buildozer:

```bash buildozer init ```

This command will create a `buildozer.spec` file in your project root, which you'll need to modify to include your Kivy app's source files.

Kivy Course - Create Python Games and Mobile Apps
Kivy Course - Create Python Games and Mobile Apps

Adding Your Kivy App's Source Files

Buildozer needs to know where to find your Kivy app's source code. Open the `buildozer.spec` file and add the following lines under the `[app.source.include_patterns]` section:

```ini # Extend or replace the default source pattern include_patterns = ['main.py', '*.kv'] ```

Python Game Development with Kivy - Flappy Bird Tutorial
Python Game Development with Kivy - Flappy Bird Tutorial

Assuming your Kivy app's source code is in a `main.py` file and any accompanying `.kv` layout files are in the same directory.

Creating Your Kivy App

Kivy Tutorial #4 - The kv Design Language (.kv file tutorial)
Kivy Tutorial #4 - The kv Design Language (.kv file tutorial)
Kivy – Python Library For Rapid Development Of Applications
Kivy – Python Library For Rapid Development Of Applications
Full Notes Taking Mobile App With kivy || python mobile apps
Full Notes Taking Mobile App With kivy || python mobile apps
Emojis in python
Emojis in python
30-Day Python Learning Plan for Beginners | Complete Python Roadmap to Learn Coding Fast
30-Day Python Learning Plan for Beginners | Complete Python Roadmap to Learn Coding Fast
learn python
learn python
30 Python Projects For Beginners | Easy To Advanced Python Project Ideas
30 Python Projects For Beginners | Easy To Advanced Python Project Ideas
9 Python Projects for Beginners (Build Your Portfolio Fast)
9 Python Projects for Beginners (Build Your Portfolio Fast)
Python Mini Project Examples
Python Mini Project Examples
Python Projects | Notion
Python Projects | Notion
Python Cheat Sheet for Beginners
Python Cheat Sheet for Beginners
Secure Python Packages Built From Source | ActiveState
Secure Python Packages Built From Source | ActiveState
a person typing on a laptop with the words 10 python project ideas for beginners
a person typing on a laptop with the words 10 python project ideas for beginners
Calculator Android App using Python | Convert .Py to APK | #Kivy Tutorial
Calculator Android App using Python | Convert .Py to APK | #Kivy Tutorial
30 Python Projects For Beginners and Advanced Learners (2023)
30 Python Projects For Beginners and Advanced Learners (2023)
Python Coding Practice | Easy Programming Logic
Python Coding Practice | Easy Programming Logic
a man holding up a poster with the words 5 levels of python on it
a man holding up a poster with the words 5 levels of python on it
| Pythonista Planet
| Pythonista Planet

Now, let's create a simple "Hello, World!" application using Kivy.

Create a `main.py` file in your project directory and add the following code:

```python from kivy.app import App from kivy.uix.label import Label class MyApp(App): def build(self): return Label(text="Hello, World!") MyApp().run() ```

This code creates a simple Kivy application that displays a "Hello, World!" label.

Creating a Basic Kivy Layout

Kivy layouts allow you to organize your UI elements. Let's create a simple BoxLayout for our application:

```python from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.uix.label import Label class MyApp(App): def build(self): layout = BoxLayout(orientation='vertical') layout.add_widget(Label(text="Hello")) layout.add_widget(Label(text="World!")) return layout MyApp().run() ```

In this example, we create a vertical `BoxLayout` and add two labels to it.

Building and Running Your Android Application

Now that you have a basic Kivy app, it's time to package it for Android.

Building your APK

Use the following command to build your APK:

```bash buildozer -v android debug ```

This command will build an APK in the `bin` directory of your project, which you can then install on an Android device or emulator.

Running your Android App on an Emulator

First, ensure you have an Android emulator set up. Then, run your app on the emulator with the following command:

```bash adb shell am start -n com.mydomain.myapp/.main.MainActivity ```

Replace `com.mydomain.myapp` with the package name specified in your `buildozer.spec` file, and ensure your emulator is running.

Congratulations! You've successfully created and run a simple Android application using Kivy. As you delve deeper into Kivy and Android development, you'll find numerous resources and libraries to help you create more complex and feature-rich applications.