You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SDL2_ttf / Harfbuzz build failure with NDK r26b despite local recipes #3295
Hello,
I am trying to build a Kivy app with Buildozer and python‑for‑android using NDK r26b, because Google Play now requires 16k page size support. With NDK r25b the build succeeds, but the generated libraries are rejected by Play Console due to the page size requirement.
When I use NDK r26b, the build fails inside SDL2_ttf’s bundled Harfbuzz with errors like:
error: cast from 'void ()(FT_Face)' (aka 'void ()(FT_FaceRec_ )')
to 'FT_Generic_Finalizer' (aka 'void ()(void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
I attempted to override the internal recipes by creating local recipes in p4a-recipes/sdl2_ttf and p4a-recipes/pyjnius-sdl2, added them to requirements, and confirmed that --local-recipes /path/to/p4a-recipes is passed to the toolchain. However, the build log never shows my local recipes being used (no print statements, no raise Exception triggers), and the build continues to use the internal SDL2_ttf with the old Harfbuzz sources.
Environment:
Buildozer on Linux
python‑for‑android master
NDK r26b (Play Console requires this for 16k page size)
Kivy 2.3.0
Requirements include python3,kivy,ffpyplayer,pillow,cryptography,android,kivymd,plyer,pyjnius,sdl2_ttf,SQLite3
Problem:
Local recipes are not being recognized/used, even though --local-recipes is passed.
As a result, SDL2_ttf always compiles with the bundled Harfbuzz that fails under NDK r26b.
Question:
How can I force python‑for‑android to use my local recipes for sdl2_ttf and pyjnius-sdl2 instead of the internal ones?
Is there an official fix or recommended approach for building with NDK r26b and satisfying Play Console’s 16k page size requirement?
I use Visual Studio Code with Python Kivy and KivyMD, that's how I started building the app that I am uploading to Play Console. I don't know p4a develop.
@ADonayreIA Sorry for the ambiguity, I meant that you should use python-for-android develop branch instead of master. develop branch already uses latest ndk.
I use Visual Studio Code with Python Kivy and KivyMD, that's how I started building the app that I am uploading to Play Console. I don't know p4a develop.
I use Visual Studio Code with Python Kivy and KivyMD, that's how I started building the app that I am uploading to Play Console. I don't know p4a develop.
p4a.branch=develop In buildozer.spec.
Thank
I overcame the problems with SDL2_ttf, but it gives me this error:
/home/adonayre/avantier/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/ffpyplayer-openssl/arm64-v8a__ndk_target_21/ffpyplayer/ffpyplayer/pic.c:1291:10: fatal error: 'libavcodec/avfft.h' file not found
with this requirements:
requirements = python3,kivy,ffpyplayer,pillow,cryptography,android,kivymd,plyer,pyjnius,sdl2_ttf,SQLite3
I use Visual Studio Code with Python Kivy and KivyMD, that's how I started building the app that I am uploading to Play Console. I don't know p4a develop.
p4a.branch=develop In buildozer.spec.
Thank
I overcame the problems with SDL2_ttf, but it gives me this error:
/home/adonayre/avantier/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/ffpyplayer-openssl/arm64-v8a__ndk_target_21/ffpyplayer/ffpyplayer/pic.c:1291:10: fatal error: 'libavcodec/avfft.h' file not found
with this requirements:
requirements = python3,kivy,ffpyplayer,pillow,cryptography,android,kivymd,plyer,pyjnius,sdl2_ttf,SQLite3
Should I try with other versions of ffpyplayer?
Thank for your help.
I hope you know about the requirements for ffmpeg based ffpyplayer. But still
I use Visual Studio Code with Python Kivy and KivyMD, that's how I started building the app that I am uploading to Play Console. I don't know p4a develop.
p4a.branch=develop In buildozer.spec.
Thank
I overcame the problems with SDL2_ttf, but it gives me this error:
/home/adonayre/avantier/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/ffpyplayer-openssl/arm64-v8a__ndk_target_21/ffpyplayer/ffpyplayer/pic.c:1291:10: fatal error: 'libavcodec/avfft.h' file not found
with this requirements:
requirements = python3,kivy,ffpyplayer,pillow,cryptography,android,kivymd,plyer,pyjnius,sdl2_ttf,SQLite3
Should I try with other versions of ffpyplayer?
Thank for your help.
I hope you know about the requirements for ffmpeg based ffpyplayer. But still
Thank, after install ffmpeg it gives me this error:
Wno-error
/home/adonayre/avantier/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/ffpyplayer-openssl/arm64-v8a__ndk_target_21/ffpyplayer/ffpyplayer/pic.c:1291:10: fatal error: 'libavcodec/avfft.h' file not found
#include "libavcodec/avfft.h"
I ty to patch with mi own local recipes for ffpyplayer.
@ADonayreIA You have to add ffmpeg in the buildozer.spec requirements before building anything related to it. It means add it in order so that ffmpeg comes first then your other requirements.
@ADonayreIA You have to add ffmpeg in the buildozer.spec requirements before building anything related to it. It means add it in order so that ffmpeg comes first then your other requirements.
@ADonayreIA You have to add ffmpeg in the buildozer.spec requirements before building anything related to it. It means add it in order so that ffmpeg comes first then your other requirements.
I hope you are not using the latest version of kivymd on girthub or else the requirments will change.
Please continue after this on official kivy discord. https://discord.gg/XmG8pup8w
👋 @ADonayreIA,
Sorry to hear you are having difficulties with Kivy's python-for-android; Kivy unites a number of different technologies, so building apps can be temperamental.
We try to use GitHub issues only to track work for developers to do to fix bugs and add new features to python-for-android.
However, this issue appears to be a support request. Please use our support channels to get help with the project.
If you're having trouble installing python-for-android, please see our quickstart guide.
If you're having trouble using python-for-android, please see our troubleshooting guide and FAQ.
Let us know if this comment was made in error, and we'll be happy to reopen the issue.
Activity
T-Dynamos commentedon Mar 23, 2026
@ADonayreIA Why not use p4a
develop?ADonayreIA commentedon Mar 23, 2026
I use Visual Studio Code with Python Kivy and KivyMD, that's how I started building the app that I am uploading to Play Console. I don't know p4a develop.
T-Dynamos commentedon Mar 24, 2026
@ADonayreIA Sorry for the ambiguity, I meant that you should use python-for-android
developbranch instead ofmaster.developbranch already uses latest ndk.Novfensec commentedon Mar 24, 2026
p4a.branch=developIn buildozer.spec.
ADonayreIA commentedon Mar 24, 2026
Thank
I overcame the problems with SDL2_ttf, but it gives me this error:
/home/adonayre/avantier/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/ffpyplayer-openssl/arm64-v8a__ndk_target_21/ffpyplayer/ffpyplayer/pic.c:1291:10: fatal error: 'libavcodec/avfft.h' file not found
with this requirements:
requirements = python3,kivy,ffpyplayer,pillow,cryptography,android,kivymd,plyer,pyjnius,sdl2_ttf,SQLite3
Should I try with other versions of ffpyplayer?
Thank for your help.
Novfensec commentedon Mar 24, 2026
I hope you know about the requirements for ffmpeg based ffpyplayer. But still
You need these libs to compile ffpyplayer.
ADonayreIA commentedon Mar 25, 2026
Thank, after install ffmpeg it gives me this error:
Wno-error
/home/adonayre/avantier/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/ffpyplayer-openssl/arm64-v8a__ndk_target_21/ffpyplayer/ffpyplayer/pic.c:1291:10: fatal error: 'libavcodec/avfft.h' file not found
#include "libavcodec/avfft.h"
I ty to patch with mi own local recipes for ffpyplayer.
it's well?
Thank for your help.
Novfensec commentedon Mar 28, 2026
@ADonayreIA You have to add
ffmpegin the buildozer.spec requirements before building anything related to it. It means add it in order so that ffmpeg comes first then your other requirements.ADonayreIA commentedon Mar 29, 2026
Thank you, this is my current requirements:
requirements = python3,kivy,ffpyplayer,pillow,cryptography,openssl,android,kivymd,plyer,pyjnius,sqlite3
What should be the order or what should be the correct requirements?
Thank you for your help.
Novfensec commentedon Mar 29, 2026
I hope you are not using the latest version of kivymd on girthub or else the requirments will change.
Please continue after this on official kivy discord. https://discord.gg/XmG8pup8w
github-actions commentedon Mar 29, 2026
👋 @ADonayreIA,
Sorry to hear you are having difficulties with Kivy's python-for-android; Kivy unites a number of different technologies, so building apps can be temperamental.
We try to use GitHub issues only to track work for developers to do to fix bugs and add new features to python-for-android.
However, this issue appears to be a support request. Please use our support channels to get help with the project.
If you're having trouble installing python-for-android, please see our quickstart guide.
If you're having trouble using python-for-android, please see our troubleshooting guide and FAQ.
Let us know if this comment was made in error, and we'll be happy to reopen the issue.