我一直在努力尝试使用 Ubuntu 24.04 LTS 中的 Kivy 将 \'hola mundo\' 部署到 android,但是我已经坚持了数周,出现这个错误,即未找到标头 readline.h......
我一直在努力尝试在 ubuntu Ubuntu 24.04 LTS ,但我已经坚持了数周,这个错误是找不到标题 readline.h。我使用了 init 命令创建的标准 buildozer.spec,只是将要求更改为 requirements = python3==3.12.3, hostpython3==3.12.3,kivy==2.3.0
我不知道如何分享整个日志,但这是最后一部分:
/home/pablo/PycharmProjects/androidDeploy/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Modules/readline.c -o Modules/readline.o
> /home/pablo/PycharmProjects/androidDeploy/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Modules/readline.c:39:12: fatal error: 'readline/readline.h' file not found
> include <readline/readline.h>
> ^~~~~~~~~~~~~~~~~~~~~
> 1 error generated.
> make: *** [Makefile:3018: Modules/readline.o] Error 1
>
>
> STDERR:
>
> Command failed: ('/usr/bin/python3', '-m', 'pythonforandroid.toolchain', 'create', '--dist_name=myapp', '--bootstrap=sdl2', '--requirements=python3==3.12.3,hostpython3==3.12.3,kivy==2.3.0', '--arch=arm64-v8a', '--arch=armeabi-v7a', '--copy-libs', '--color=always', '--storage-dir=/home/pablo/PycharmProjects/androidDeploy/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a', '--ndk-api=21', '--ignore-setup-py', '--debug')
> Error code: 1
> ENVIRONMENT:
> SHELL = '/bin/bash'
> SESSION_MANAGER = 'local/pablo-OptiPlex-3050:@/tmp/.ICE-unix/1622,unix/pablo-OptiPlex-3050:/tmp/.ICE-unix/1622'
> QT_ACCESSIBILITY = '1'
> COLORTERM = 'truecolor'
> XDG_CONFIG_DIRS = '/etc/xdg/xdg-ubuntu:/etc/xdg'
> XDG_MENU_PREFIX = 'gnome-'
> GNOME_DESKTOP_SESSION_ID = 'this-is-deprecated'
> GNOME_SHELL_SESSION_MODE = 'ubuntu'
> SSH_AUTH_SOCK = '/run/user/1000/keyring/ssh'
> MEMORY_PRESSURE_WRITE = 'c29tZSAyMDAwMDAgMjAwMDAwMAA='
> XMODIFIERS = '@im=ibus'
> DESKTOP_SESSION = 'ubuntu'
> GTK_MODULES = 'gail:atk-bridge'
> PWD = '/home/pablo/PycharmProjects/androidDeploy'
> LOGNAME = 'pablo'
> XDG_SESSION_DESKTOP = 'ubuntu'
> XDG_SESSION_TYPE = 'wayland'
> SYSTEMD_EXEC_PID = '1663'
> XAUTHORITY = '/run/user/1000/.mutter-Xwaylandauth.OV0AR2'
> HOME = '/home/pablo'
> USERNAME = 'pablo'
> IM_CONFIG_PHASE = '1'
> LANG = 'en_US.UTF-8'
> XDG_CURRENT_DESKTOP = 'ubuntu:GNOME'
> MEMORY_PRESSURE_WATCH = '/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/[email protected]/memory.pressure'
> VTE_VERSION = '7600'
> WAYLAND_DISPLAY = 'wayland-0'
> GNOME_TERMINAL_SCREEN = '/org/gnome/Terminal/screen/9329102b_46df_4d9d_b9de_7c08e5a177a1'
> GNOME_SETUP_DISPLAY = ':1'
> XDG_SESSION_CLASS = 'user'
> TERM = 'xterm-256color'
> USER = 'pablo'
> GNOME_TERMINAL_SERVICE = ':1.121'
> DISPLAY = ':0'
> SHLVL = '1'
> GSM_SKIP_SSH_AGENT_WORKAROUND = 'true'
> QT_IM_MODULE = 'ibus'
> XDG_RUNTIME_DIR = '/run/user/1000'
> DEBUGINFOD_URLS = 'https://debuginfod.ubuntu.com '
> XDG_DATA_DIRS = '/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop'
> PATH = '/home/pablo/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/pablo/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin'
> GDMSESSION = 'ubuntu'
> DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/user/1000/bus'
> OLDPWD = '/home/pablo/PycharmProjects/androidDeploy/buildozer'
> _ = '/usr/local/bin/buildozer'
> PACKAGES_PATH = '/home/pablo/.buildozer/android/packages'
> ANDROIDSDK = '/home/pablo/.buildozer/android/platform/android-sdk'
> ANDROIDNDK = '/home/pablo/.buildozer/android/platform/android-ndk-r25b'
> ANDROIDAPI = '31'
> 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
hope someone can orient me to find a solution. Thanks