kivy / kivy/python-for-android

Build Error in "tflite-runtime" Recipe

Open
#3,191 0 comments 0 reactions 0 assignees View on GitHub
recipe
Dominant language
Python
Stars
8.9k
Forks
2k
Avg merge
12h 20m
Merged PRs (30d)
9

Description

I'm using Buildozer to build a Python program using "tflite-runtime" and generate an APK file for installation on Android(SmartPhone). I set up the Buildozer environment and directory structure, and ran Buildozer using the "tflite-runtime" directory in the "python-for-android-release-2024.01.21" recipe, but I get the following error. I'm having trouble with this.

■Build Error (excerpt)
----------------------------------------------------------------------------------------
undefined symbol: tflite::ops::builtin::BuiltinOpResolver::BuiltinOpResolver()
----------------------------------------------------------------------------------------

■Environment
・Base OS: Ubuntu 22.04

■Python Virtual Environment:
・Python version: 3.10.12
・Buildozer version: 1.5.0

■Directory Structure at Build Time
~/test_build/
├── main.py
├── buildozer.spec
└── recipes/
└── tflite-runtime/
├── CMakeLists.patch
├── __init__.py
└── build_with_cmake.patch

I created a local directory and copied the recipe from into it.
I have not modified any files inside the directory.
In , I’ve set .

■Build Steps
1. Activated the Python virtual environment .
2. Navigated to the directory.
3. Ran the following command:
"buildozer -v android debug 2>&1 | tee buildozer_build_$(date +%Y%m%d_%H%M%S).log"

I would greatly appreciate any guidance on how to resolve this error and successfully generate the APK file.
Thank you in advance for your support!

Supplement:
As a supplement, I am attaching the "buildozer.spec" I am currently using and the build log file.

[buildozer_build_20250820_103330.log](https://github.com/user-attachments/files/21890718/buildozer_build_20250820_103330.log)
[Buildozer_specFail.txt](https://github.com/user-attachments/files/21890717/Buildozer_specFail.txt)

Contributor guide

Open the contributing guide

Research direction

Start with the attached build log and Buildozer_specFail.txt, then inspect recipes/tflite-runtime/__init__.py, CMakeLists.patch, and build_with_cmake.patch. Reproduce the Android debug build and trace the undefined symbol to the recipe configuration; done means the tflite-runtime recipe builds successfully and generates the APK.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, cmake, python
Domain
build-system, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.