我用python编写了一个程序,并编写了一个.kv文件,我可以运行它,它可以正常工作。但是,当我想使用buildozer在导航到工作目录并输入buildozer init
,然后在规范文件中添加图标和预置文件之后,使用buildozer构建它时,我会编写buildozer -v android debug
。然后它输入不同的东西。我认为可能重要的几件事是:/bin/sh: dpkg: command not found
,
在那之后:
configure: error: internal configure error for the platform triplet, please file a
bug report
Exception in thread background thread for pid 89524:
最重要的是:
STDOUT:
checking build system type... x86_64-apple-darwin21.4.0
checking host system type... x86_64-apple-darwin21.4.0
checking for python3.8... no
checking for python3... python3
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... "darwin"
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for a sed that does not truncate output... /usr/bin/sed
checking for --with-cxx-main=<compiler>... no
checking for g++... no
configure:
By default, distutils will build C++ extension modules with "g++".
If this is not intended, then set CXX on the configure command line.
checking for the platform triplet based on compiler characteristics... darwin
configure: error: internal configure error for the platform triplet, please file a
bug report
STDERR:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py",
line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py",
line 87, in _run_code
exec(code, run_globals)
File "/Users/grzesiek/Desktop/kalkulator/.buildozer/android/platform/python-for-
android/pythonforandroid/toolchain.py,第1294行,在main() "/Users/grzesiek/Desktop/kalkulator/.buildozer/android/platform/python-for- /pythonforandroid/entrypoints.py“中,第18行,在ToolchainCL() ToolchainCL/pythonforandroid/toolchain.py中,第728行,在init getattr(self,( args)文件"/Users/grzesiek/Desktop/kalkulator/.buildozer/android/platform/python-for- android/pythonforandroid/toolchain.py",第151行,在wrapper_func build_dist_from_args(ctx,dist,args)wrapper_func build_dist_from_args /pythonforandroid/toolchain.py“中,第210行,在build_dist_from_args build_recipes(build_order,python_modules,ctx,文件"/Users/grzesiek/Desktop/kalkulator/.buildozer/android/platform/python-for- android/pythonforandroid/build.py,第596行,在build_recipes recipe.build_arch(arch)文件"/Users/grzesiek/Desktop/kalkulator/.buildozer/android/platform/python-for- android/pythonforandroid/recipes/hostpython3/init.py",第95行中,在build_arch shprint(sh.Command(连接(Recipe_build_dir),‘"/Users/grzesiek/Desktop/kalkulator/.buildozer/android/platform/python-for-’))文件"/Users/grzesiek/Library/Python/3.9/lib/python/site-packages/sh.py",android/pythonforandroid/logger.py",第167行,在输出中的行:文件"/Users/grzesiek/Library/Python/3.9/lib/python/site-packages/sh.py",行953,在下一个self.wait()文件“/Users/grzesiek/Library/Python/3.9/lib/python/site-packages/sh.py”,行879,在wait self.handle_command_exit_code(exit_code) File sh.ErrorReturnCode_1第905行中,在handle_command_exit_code raise exc sh.ErrorReturnCode_1中:
RAN: /Users/grzesiek/Desktop/kalkulator/.buildozer/android/platform/build-arm64-
v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/configure
STDOUT:
checking build system type... x86_64-apple-darwin21.4.0
checking host system type... x86_64-apple-darwin21.4.0
checking for python3.8... no
checking for python3... python3
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... "darwin"
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for a sed that does not truncate output... /usr/bin/sed
checking for --with-cxx-main=<compiler>... no
checking for g++... no
configure:
By default, distutils will build C++ extension modules with "g++".
If this is not intended, then set CXX on the configure command line.
checking for the platform triplet based on compiler characteristics... darwin
configure: error: internal configure error for the platform triplet, please file a
bug report
STDERR:
# Command failed: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -m
pythonforandroid.toolchain create --dist_name=kalkulator --bootstrap=sdl2 --
requirements=python3,kivy --arch arm64-v8a --arch armeabi-v7a --copy-libs --
color=always --storage-
dir="/Users/grzesiek/Desktop/kalkulator/.buildozer/android/platform/build-arm64-
v8a_armeabi-v7a" --ndk-api=21 --ignore-setup-py --debug
# ENVIRONMENT:
# TMPDIR = '/var/folders/l_/g3zlw0w55nbc9k1v110rn0gh0000gn/T/'
# __CFBundleIdentifier = 'com.apple.Terminal'
# XPC_FLAGS = '0x0'
# TERM = 'xterm-256color'
# DISPLAY = '/private/tmp/com.apple.launchd.RArnFLp29W/org.xquartz:0'
# SSH_AUTH_SOCK = '/private/tmp/com.apple.launchd.FmVNzY5SpB/Listeners'
# XPC_SERVICE_NAME = '0'
# TERM_PROGRAM = 'Apple_Terminal'
# TERM_PROGRAM_VERSION = '444'
# TERM_SESSION_ID = '79D90C22-EBBE-40E7-A4E4-7F76B66B2457'
# SHELL = '/bin/zsh'
# HOME = '/Users/grzesiek'
# LOGNAME = 'grzesiek'
# USER = 'grzesiek'
# PATH = '/Users/grzesiek/.buildozer/android/platform/apache-ant-
1.9.4/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.9/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/Python.framework/Versions/3.9/bin/python3:/opt/X11/bin:/Library/Apple/usr/bin:/Users/grzesiek/bin:/Users/gr zesiek/Library/Python/3.9/bin‘# SHLVL = '1‘# PWD =’User/grzesiek/Desktop/Kalkulator‘# OLDPWD =’用户/grzesiek/Desktop‘# LANG = 'pl_PL.UTF-8’#_= '/Users/grzesiek/Library/Python/3.9/bin/buildozer‘# __CF_USER_TEXT_ENCODING = '0x1F5:0x1D:0x2A’# PACKAGES_PATH =‘PACKAGES_PATH’/grzesiek/..buildozer/android/android/包‘# ANDROIDSDK = '/Users/grzesiek/.buildozer/android/platform/android-sdk’# ANDROIDNDK = '/Users/grzesiek/.buildozer/android/platform/android-ndk-r19c‘# ANDROIDAPI = '27’# ANDROIDMINAPI = '21‘## Buildozer未能执行最后一个命令#错误可能隐藏在此错误上面的日志#请阅读完整的日志,在#向buildozer本身提出一个问题之前,先搜索它。#如果出现错误报告,请使用log_level =2添加完整日志。
我知道,这是展示我所得到的东西的一种糟糕的方式。我正在学习本教程:https://www.youtube.com/watch?v=zk0MeJ7YIMc有帮助吗?提前感谢!
发布于 2022-06-15 01:52:44
嘿,我也有这个问题。这篇文章似乎为我解决了问题。
https://github.com/kivy/python-for-android/issues/2568
基本上,只需尝试将其添加到buildozer.spec文件中的需求中即可。
requirements = python3==3.9.12,hostpython3==3.9.12
https://stackoverflow.com/questions/72393394
复制相似问题