Buildozer,无法计算 sizeof (size_t)

1 投票
1 回答
1043 浏览
提问于 2025-04-18 14:00

我正在用buildozer编译我的kivy应用程序。我是在Windows上使用kivy Android虚拟机。

configure: error: in '/home/kivy/Mole/.buildozer/android/platform/python-for- android/build/python/Python-2.7.2':
configure: error: cannot compute sizeof (size_t)
See 'config.log' for more details
checking size of size_t... # command failed: ./distribute.sh -m "kivy" -d "molebash"

我不太确定在哪里可以找到或访问'config.log'文件,如果有人知道这个文件大概存放在哪里,我可以把它也加上。

抱歉描述得有点简短,但我不太确定哪些信息能帮助解决这个问题。如果你告诉我需要什么信息,我会发布你可能需要的其他内容。

谢谢!

1 个回答

1

经过一番搜索,我终于找到了解决办法!

在你的buildozer配置文件中,找到以下几行,并按照下面的方式进行修改:

(str) Android NDK version to use
android.ndk = 8c

(str) Android NDK directory (if empty, it will be automatically downloaded.)
android.ndk_path = ~/android/android-ndk-r8c

(str) Android SDK directory (if empty, it will be automatically downloaded.)
android.sdk_path = ~/android/android-sdk-linux

(str) python-for-android git clone directory (if empty, it will be automatically cloned from github)
android.p4a_dir = ~/android/python-for-android

这样做是为了把buildozer和kivy虚拟机中的SDK/NDK/P4A连接起来。

如果你不设置这些,buildozer会自动下载新的副本。问题可能出在buildozer下载和安装这些新副本的方式上。有更了解buildozer的人可能能更清楚地解释这个问题的原因!

撰写回答