Reputation: 111
I wrote a program in python and wrote a .kv file and I can run it and it works properly. But when I want to build it for android using buildozer after navigating to the working directory and typing buildozer init
and then in the spec file adding the icon and the presplash, after that i write buildozer -v android debug
. Then it types different things. Few things I think might be important are: /bin/sh: dpkg: command not found
,
and after that:
configure: error: internal configure error for the platform triplet, please file a
bug report
Exception in thread background thread for pid 89524:
And what's probably most important:
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", line 1294, in main() File "/Users/grzesiek/Desktop/kalkulator/.buildozer/android/platform/python-for- android/pythonforandroid/entrypoints.py", line 18, in main ToolchainCL() File "/Users/grzesiek/Desktop/kalkulator/.buildozer/android/platform/python-for- android/pythonforandroid/toolchain.py", line 728, in init getattr(self, command)(args) File "/Users/grzesiek/Desktop/kalkulator/.buildozer/android/platform/python-for- android/pythonforandroid/toolchain.py", line 151, in wrapper_func build_dist_from_args(ctx, dist, args) File "/Users/grzesiek/Desktop/kalkulator/.buildozer/android/platform/python-for- android/pythonforandroid/toolchain.py", line 210, in build_dist_from_args build_recipes(build_order, python_modules, ctx, File "/Users/grzesiek/Desktop/kalkulator/.buildozer/android/platform/python-for- android/pythonforandroid/build.py", line 596, in build_recipes recipe.build_arch(arch) File "/Users/grzesiek/Desktop/kalkulator/.buildozer/android/platform/python-for- android/pythonforandroid/recipes/hostpython3/init.py", line 95, in build_arch shprint(sh.Command(join(recipe_build_dir, 'configure'))) File "/Users/grzesiek/Desktop/kalkulator/.buildozer/android/platform/python-for- android/pythonforandroid/logger.py", line 167, in shprint for line in output: File "/Users/grzesiek/Library/Python/3.9/lib/python/site-packages/sh.py", line 953, in next self.wait() File "/Users/grzesiek/Library/Python/3.9/lib/python/site-packages/sh.py", line 879, in wait self.handle_command_exit_code(exit_code) File "/Users/grzesiek/Library/Python/3.9/lib/python/site-packages/sh.py", line 905, in 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 = '/Users/grzesiek/Desktop/Kalkulator' # OLDPWD = '/Users/grzesiek/Desktop' # LANG = 'pl_PL.UTF-8' # _ = '/Users/grzesiek/Library/Python/3.9/bin/buildozer' # __CF_USER_TEXT_ENCODING = '0x1F5:0x1D:0x2A' # PACKAGES_PATH = '/Users/grzesiek/.buildozer/android/packages' # ANDROIDSDK = '/Users/grzesiek/.buildozer/android/platform/android-sdk' # ANDROIDNDK = '/Users/grzesiek/.buildozer/android/platform/android-ndk-r19c' # ANDROIDAPI = '27' # ANDROIDMINAPI = '21' # # Buildozer failed to execute the last command # The error might be hidden in the log above this error # Please read the full log, and search for it before # raising an issue with buildozer itself. # In case of a bug report, please add a full log with log_level = 2
I'm aware of that, that it's a miserable way of showing what I got. I'm following this tutorial: https://www.youtube.com/watch?v=zk0MeJ7YIMc Can any one help? Thanks in advance!
Upvotes: 1
Views: 1126
Reputation: 11
Hey I was having this issue as well. This post seemed to fix it for me.
https://github.com/kivy/python-for-android/issues/2568
Basically just try adding this to the requirements in your buildozer.spec file.
requirements = python3==3.9.12,hostpython3==3.9.12
Upvotes: 1