Building
Yes! Here's a fully working setup to build your Kivy APK using Buildozer on GitHub Actions — no desktop or Termux build needed. ✅
🔧 Overview
You'll get:
✅ .apk file as GitHub Actions artifact
✅ Kivy + optional Python packages (e.g. music21, requests, etc.)
✅ Customizable main.py
✅ Buildozer ready-to-go in cloud
📁 Folder Structure
your-app/ ├── .github/ │ └── workflows/ │ └── build.yml ← GitHub Actions script ├── main.py ← Your Kivy app ├── buildozer.spec ← Buildozer config
1️⃣ main.py — minimal Kivy app
Replace this with your app:
from kivy.app import App from kivy.uix.label import Label
class SridawApp(App): def build(self): return Label(text="🎵 Hello from music21!")
if name == "main": SridawApp().run()
2️⃣ buildozer.spec
Here’s a minimal one to get started (supports music21 too):
[app] title = Sridaw package.name = sridaw package.domain = org.sridaw source.dir = . source.include_exts = py,png,jpg,kv,atlas version = 0.1 requirements = python3,kivy,music21 orientation = portrait osx.kivy_version = 2.2.1 android.permissions = INTERNET
[buildozer] log_level = 2 warn_on_root = 1
3️⃣ .github/workflows/build.yml
name: Build Kivy APK
on: push: branches: [main] workflow_dispatch:
jobs: build: runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y git zip unzip openjdk-17-jdk python3-pip python3-setuptools
pip install --upgrade pip
pip install buildozer cython
- name: Install Android SDK/NDK
run: |
sudo apt install -y libncurses5 libstdc++6 zlib1g:i386
buildozer android update
- name: Build APK
run: |
buildozer android debug
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: sridaw.apk
path: bin/*.apk
✅ Final Steps
-
Push this to a GitHub repo (e.g., github.com/yourname/sridaw)
-
Go to Actions tab → Trigger build
-
After a few minutes, download sridaw-0.1-debug.apk from artifacts 🎉
⚠️ Notes
music21 is huge — may cause slow builds or out-of-memory errors on free GitHub tier. If it fails, try with just kivy first.
APK output is unsigned debug build. You can sign it manually later or automate that too.
💬 Want me to generate this as a zip template?
Just say Make the full GitHub repo, and I’ll prepare a .zip with everything.