在使用Buildozer构建Android应用时,如果不想安装hostpython3(通常Buildozer会自动安装),可以进行以下操作:
方法一:在buildozer.spec文件中进行配置
requirements = hostpython3, sdl2, ...
...
# (str) Android NDK version to use
android.ndk = 19b
将它们修改为:
#requirements = hostpython3, sdl2, ...
...
# (str) Android NDK version to use
android.ndk = 19b
方法二:使用命令行参数
buildozer android debug --no-requirements
这两种方法都可以禁止Buildozer安装hostpython3。你可以根据自己的需求选择其中一种方法来解决问题。