kivy / kivy/python-for-android

Build Error in "tflite-runtime" Recipe

未关闭
#3,191 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

recipe
主要语言
Python
星标
8.9k
派生
2k
平均合并
12 小时 20 分钟
30 天内合并 PR
9

描述

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
Buildozer_specFail.txt

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

先查看附带的构建日志和 Buildozer_specFail.txt,然后检查 recipes/tflite-runtime/init.py、CMakeLists.patch 和 build_with_cmake.patch。重新执行 Android debug build,并将 undefined symbol 追溯到 recipe 配置;当 tflite-runtime recipe 成功构建并生成 APK 时即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
android, cmake, python
领域
build-system, mobile
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。