Buildozer is a generic Python packager designed to create application bundles for various platforms, primarily Android and iOS, from Python projects (most notably Kivy applications). It automates the complex process of compiling Python code and its dependencies into native packages (APKs, AABs, IPAs). The current version is 1.5.0, and it generally follows Kivy's release cycle, with new versions typically released every few months to support updated SDKs and Kivy versions.
pip install buildozerNo compatibility data collected yet for this library.
Buildozer is primarily a command-line tool. After installing Buildozer and creating a Kivy application (e.g., `main.py`), navigate to your project directory in the terminal. First, initialize Buildozer for your project, which creates a `buildozer.spec` file: ```bash buildozer init ``` Edit `buildozer.spec` to configure your app, paying attention to `requirements` (e.g., `requirements = python3,kivy`) and `android.min_sdk_version`. Then, build your application for Android (this will download SDKs/NDKs and compile): ```bash buildozer android debug ``` The resulting `.apk` or `.aab` will be found in the `bin/` directory.
Review the changelog for required SDK/NDK versions or `buildozer.spec` changes. Ensure your SDK/NDK are updated via `sdkmanager` and `buildozer.spec` reflects the correct versions.
Ensure Java JDK (typically 11 or 17) is installed and `JAVA_HOME` is set. Install Android SDK Command-line Tools via Android Studio or `sdkmanager`. Accept all Android SDK licenses by running `sdkmanager --licenses`.
Upgrade Buildozer to 1.3.0 or newer and ensure `python-for-android` is up-to-date. Configure `buildozer.spec` with `android.release_unit = aab`.
If upgrading from very old Buildozer versions, it's often best to regenerate `buildozer.spec` with `buildozer init` and port over relevant settings, rather than manually updating an old one. Ensure your `buildozer.spec` doesn't use `android_old` unless specifically targeting legacy builds.
Open `buildozer.spec` and verify the `requirements` line (e.g., `requirements = python3,kivy`). Ensure `python-for-android` is updated or that a compatible version is installed.
Run `yes | sdkmanager --licenses` in your terminal to automatically accept all pending Android SDK licenses. Ensure `sdkmanager` is in your PATH.
Set the `ANDROID_HOME` environment variable to the root of your Android SDK installation. Install the latest Android SDK Command-line Tools using Android Studio or `sdkmanager` itself (if it's already partially set up).
Upgrade Buildozer to version 1.1.0 or newer. This issue was fixed in version 1.1.0.