I’m having trouble using buildozer 1.3 to create an Android application from Python code. My issue is that it always compiles with Android API 27, even if I specify a different version in my buildozer.spec file.
The build process appears to work correctly, and the app is generated without issues. However, when I attempt to upload it to the Google Play Store, it’s rejected because API 27 is outdated. The console output indicates that API 31 is being utilized during the build process, but the final APK still shows API 27.
I’ve tried a variety of solutions, including a complete reinstallation of buildozer, setting up a new WSL environment from scratch, and even removing the buildozer.spec file to confirm I was editing the correct one. Unfortunately, none of these efforts have resolved the problem.
Here are the relevant details from my console output during the build:
[INFO]: Will compile for the following archs: armeabi-v7a, arm64-v8a
[INFO]: Found Android API target in $ANDROIDAPI: 31
[INFO]: Available Android APIs are (27, 30, 31)
[INFO]: Requested API target 31 is available, continuing.
[INFO]: Found NDK dir in $ANDROIDNDK: /home/user/.buildozer/android/platform/android-ndk-r21d
[INFO]: Found NDK version 21d
The settings in my buildozer.spec file are as follows:
[app]
title = My Test App
package.name = mytestapp
package.domain = dev.myapps
source.dir = .
version = 0.1
requirements = python3,kivy,plyer,android
orientation = portrait
[buildozer]
fullscreen = 0
android.api = 31
android.minapi = 21
android.ndk = 21d
android.ndk_api = 21
android.archs = arm64-v8a, armeabi-v7a
Can anyone explain why the final APK is still using API 27 when everything seems to be set up correctly?