我无法通过构建器生成APK



我正在使用Kivy创建一个应用程序。现在,我想在我的智能手机中测试应用程序,但我无法生成apk。下面的代码是在Linux(opensuse(中编写的。

是否需要安装更多的依赖项?我认为错误出现在以下代码的末尾。我怎么能理解发生了什么?

这里,显示给我的信息:

leonardo@linux-eu06://home/leonardo/program> buildozer -v android debug
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
/bin/sh: dpkg: command not found
# Search for Git (git)
#  -> found at /usr/lib/git/git
# Search for Cython (cython)
#  -> found at /usr/bin/cython
# Search for Java compiler (javac)
#  -> found at /usr/lib64/jvm/java-1.8.0-openjdk-1.8.0/bin/javac
# Search for Java keytool (keytool)
#  -> found at /usr/lib64/jvm/java-1.8.0-openjdk-1.8.0/jre/bin/keytool
# Install platform
# Run 'git config --get remote.origin.url'
# Cwd /home/leonardo/program/.buildozer/android/platform/python-for-android
https://github.com/kivy/python-for-android.git
# Run 'git branch -vv'
# Cwd /home/leonardo/program/.buildozer/android/platform/python-for-android
* master b1f6064d [origin/master] Release 2019.10.06 (#1998)
# Run '/usr/bin/python3 -m pip install -q --user 'appdirs' 'colorama>=0.3.3' 'jinja2' 'six' 'enum34; python_version<"3.4"' 'sh>=1.10; sys_platform!="nt"' 'pep517<0.7.0"' 'pytoml' 'virtualenv''
...............
return self.__env[name]
File "/usr/lib/python3.6/site-packages/sh.py", line 3226, in __getitem__
raise CommandNotFound(k)
sh.CommandNotFound: patch
# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/leonardo/program/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21                                                      
# ENVIRONMENT:
#     GS_LIB = '/home/leonardo/.fonts'
#     KDE_FULL_SESSION = 'true'
#     LS_COLORS = 'no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.xz=00;31:*.avi=01;35:*.bmp=01;35:*.dl=01;35:*.fli=01;35:*.gif=01;35:*.gl=01;35:*.jpg=01;35:*.jpeg=01;35:*.mkv=01;35:*.mng=01;35:*.mov=01;35:*.mp4=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.svg=01;35:*.tga=01;35:*.tif=01;35:*.webm=01;35:*.webp=01;35:*.wmv=01;35:*.xbm=01;35:*.xcf=01;35:*.xpm=01;35:*.aiff=00;32:*.ape=00;32:*.au=00;32:*.flac=00;32:*.m4a=00;32:*.mid=00;32:*.mp3=00;32:*.mpc=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:*.wma=00;32:*.wv=00;32:'                                                                                                 
#     HOSTTYPE = 'x86_64'
#     XAUTHLOCALHOSTNAME = 'linux-eu06'
#     LESSCLOSE = 'lessclose.sh %s %s'
#     XKEYSYMDB = '/usr/X11R6/lib/X11/XKeysymDB'
#     LANG = 'pt_PT.UTF-8'
#     WINDOWMANAGER = '/usr/bin/startkde'
#     LESS = '-M -I -R'
#     PROFILEHOME = ''
#     DISPLAY = ':0'
#     JAVA_ROOT = '/usr/lib64/jvm/java'
#     HOSTNAME = 'linux-eu06'
#     SHELL_SESSION_ID = '789fbea46fec4654aed5fff424f3a209'
#     CONFIG_SITE = '/usr/share/site/x86_64-unknown-linux-gnu'
#     CSHEDIT = 'emacs'
#     GPG_TTY = '/dev/pts/0'
#     AUDIODRIVER = 'pulseaudio'
#     LESS_ADVANCED_PREPROCESSOR = 'no'
#     COLORTERM = 'truecolor'
#     JAVA_HOME = '/usr/lib64/jvm/java'
#     ALSA_CONFIG_PATH = '/etc/alsa-pulse.conf'
#     MACHTYPE = 'x86_64-suse-linux'
#     XDG_VTNR = '7'
#     QEMU_AUDIO_DRV = 'pa'
#     MINICOM = '-c on'
#     QT_SYSTEM_DIR = '/usr/share/desktop-data'
#     OSTYPE = 'linux'
#     XDG_SESSION_ID = '1'
#     USER = 'leonardo'
#     PAGER = 'less'
#     DESKTOP_SESSION = '/usr/share/xsessions/default'
#     KONSOLE_VERSION = '181203'
#     GTK2_RC_FILES = '/etc/gtk-2.0/gtkrc:/home/leonardo/.gtkrc-2.0:/home/leonardo/.config/gtkrc-2.0'
#     MORE = '-sl'
#     PWD = '//home/leonardo/program'
#     SSH_ASKPASS = '/usr/lib/ssh/ssh-askpass'
#     HOME = '/home/leonardo'
#     HOST = 'linux-eu06'
#     XNLSPATH = '/usr/share/X11/nls'
#     XDG_SESSION_TYPE = 'x11'
#     SDK_HOME = '/usr/lib64/jvm/java'
#     XDG_DATA_DIRS = '/home/leonardo/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share'
#     KONSOLE_DBUS_SESSION = '/Sessions/1'
#     JDK_HOME = '/usr/lib64/jvm/java'
#     XDG_SESSION_DESKTOP = 'KDE'
#     PROFILEREAD = 'true'
#     KONSOLE_DBUS_WINDOW = '/Windows/1'
#     GTK_MODULES = 'canberra-gtk-module'
#     FROM_HEADER = ''
#     MAIL = '/var/spool/mail/leonardo'
#     LESSKEY = '/etc/lesskey.bin'
#     TERM = 'xterm-256color'
#     SHELL = '/bin/bash'
#     KONSOLE_DBUS_SERVICE = ':1.35'
#     XDG_SESSION_CLASS = 'user'
#     XDG_SEAT_PATH = '/org/freedesktop/DisplayManager/Seat0'
#     QT_IM_MODULE = 'xim'
#     XMODIFIERS = '@im=local'
#     LS_OPTIONS = '-N --color=tty -T 0'
#     XCURSOR_THEME = 'breeze_cursors'
#     XDG_CURRENT_DESKTOP = 'KDE'
#     KONSOLE_PROFILE_NAME = 'Predefinição'
#     XDG_SEAT = 'seat0'
#     SHLVL = '2'
#     COLORFGBG = '15;0'
#     LANGUAGE = ''
#     G_FILENAME_ENCODING = '@locale,UTF-8,ISO-8859-15,CP1252'
#     MANPATH = '/usr/local/man:/usr/share/man'
#     GTK_RC_FILES = '/etc/gtk/gtkrc:/home/leonardo/.gtkrc:/home/leonardo/.config/gtkrc'
#     WINDOWID = '56623110'
#     XSESSION_IS_UP = 'yes'
#     LOGNAME = 'leonardo'
#     DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/user/1000/bus'
#     XDG_RUNTIME_DIR = '/run/user/1000'
#     XAUTHORITY = '/home/leonardo/.Xauthority'
#     JRE_HOME = '/usr/lib64/jvm/java/jre'
#     XDG_SESSION_PATH = '/org/freedesktop/DisplayManager/Session0'
#     QT_AUTO_SCREEN_SCALE_FACTOR = '0'
#     XDG_CONFIG_DIRS = '/etc/xdg'
#     PATH = '/home/leonardo/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/leonardo/bin:/usr/local/bin:/usr/bin:/bin'
#     JAVA_BINDIR = '/usr/lib64/jvm/java/bin'
#     KDE_SESSION_UID = '1000'
#     SDL_AUDIODRIVER = 'pulse'
#     KDE_SESSION_VERSION = '5'
#     QT_IM_SWITCHER = 'imsw-multi'
#     G_BROKEN_FILENAMES = '1'
#     HISTSIZE = '1000'
#     SESSION_MANAGER = 'local/linux-eu06:@/tmp/.ICE-unix/1823,unix/linux-eu06:/tmp/.ICE-unix/1823'
#     CPU = 'x86_64'
#     CVS_RSH = 'ssh'
#     LESSOPEN = 'lessopen.sh %s'
#     GTK_IM_MODULE = 'cedilla'
#     OLDPWD = '/home/leonardo'
#     _ = '/usr/bin/buildozer'
#     PACKAGES_PATH = '/home/leonardo/.buildozer/android/packages'
#     ANDROIDSDK = '/home/leonardo/.buildozer/android/platform/android-sdk'
#     ANDROIDNDK = '/home/leonardo/.buildozer/android/platform/android-ndk-r19b'
#     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
leonardo@linux-eu06://home/leonardo/program> 

更新

在@increment的提示之后,第一种情况已经解决,但它仍然显示出问题。我只讲最后一部分,我认为问题出在哪里。STDERR和STDOUT是什么?

[INFO]:    -> directory context /home/leonardo/program/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools                                                                                                                                                            
[INFO]:    -> running python3 setup.py install -O2 --root=/home/leonardo/program/.buildozer/android/platform/build-armeabi-v7a/build/pytho...(and 32 more)
Exception in thread background thread for pid 7551:                                                                                                                  
Traceback (most recent call last):
File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib64/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python3.6/site-packages/sh.py", line 1540, in wrap
fn(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/sh.py", line 2459, in background_thread
handle_exit_code(exit_code)
File "/usr/lib/python3.6/site-packages/sh.py", line 2157, in fn
return self.command.handle_command_exit_code(exit_code)
File "/usr/lib/python3.6/site-packages/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1: 
RAN: /home/leonardo/program/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 setup.py install -O2 --root=/home/leonardo/program/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp --install-lib=.
STDOUT:
Traceback (most recent call last):
File "setup.py", line 11, in <module>
import setuptools
File "/home/leonardo/program/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/__init__.py", line 20, in <module>
from setuptools.dist import Distribution, Feature
File "/home/leonardo/program/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/dist.py", line 36, in <module>
from setuptools import windows_support
File "/home/leonardo/program/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/windows_support.py", line 2, in <module>
import ctypes
File "/home/leonardo/program/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Lib/ctypes/__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'

STDERR:

Traceback (most recent call last):
File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/leonardo/program/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1196, in <module>
main()
File "/home/leonardo/program/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
ToolchainCL()
File "/home/leonardo/program/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 671, in __init__
getattr(self, args.subparser_name.replace('-', '_'))(args)
File "/home/leonardo/program/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 155, in wrapper_func
build_dist_from_args(ctx, dist, args)
File "/home/leonardo/program/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 209, in build_dist_from_args
args, "ignore_setup_py", False
File "/home/leonardo/program/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 580, in build_recipes
recipe.build_arch(arch)
File "/home/leonardo/program/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 960, in build_arch
self.install_python_package(arch)
File "/home/leonardo/program/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 979, in install_python_package
_env=hpenv, *self.setup_extra_args)
File "/home/leonardo/program/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 180, in shprint
for line in output:
File "/usr/lib/python3.6/site-packages/sh.py", line 863, in next
self.wait()
File "/usr/lib/python3.6/site-packages/sh.py", line 792, in wait
self.handle_command_exit_code(exit_code)
File "/usr/lib/python3.6/site-packages/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1: 
RAN: /home/leonardo/program/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 setup.py install -O2 --root=/home/leonardo/program/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp --install-lib=.
STDOUT:
Traceback (most recent call last):
File "setup.py", line 11, in <module>
import setuptools
File "/home/leonardo/program/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/__init__.py", line 20, in <module>
from setuptools.dist import Distribution, Feature
File "/home/leonardo/program/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/dist.py", line 36, in <module>
from setuptools import windows_support
File "/home/leonardo/program/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/windows_support.py", line 2, in <module>
import ctypes
File "/home/leonardo/program/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Lib/ctypes/__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'

STDERR:
# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/leonardo/program/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21                                                      
# ENVIRONMENT:
#     GS_LIB = '/home/leonardo/.fonts'
#     KDE_FULL_SESSION = 'true'
#     LS_COLORS = 'no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.xz=00;31:*.avi=01;35:*.bmp=01;35:*.dl=01;35:*.fli=01;35:*.gif=01;35:*.gl=01;35:*.jpg=01;35:*.jpeg=01;35:*.mkv=01;35:*.mng=01;35:*.mov=01;35:*.mp4=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.svg=01;35:*.tga=01;35:*.tif=01;35:*.webm=01;35:*.webp=01;35:*.wmv=01;35:*.xbm=01;35:*.xcf=01;35:*.xpm=01;35:*.aiff=00;32:*.ape=00;32:*.au=00;32:*.flac=00;32:*.m4a=00;32:*.mid=00;32:*.mp3=00;32:*.mpc=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:*.wma=00;32:*.wv=00;32:'                                                                                                 
#     HOSTTYPE = 'x86_64'
#     XAUTHLOCALHOSTNAME = 'linux-eu06'
#     LESSCLOSE = 'lessclose.sh %s %s'
#     XKEYSYMDB = '/usr/X11R6/lib/X11/XKeysymDB'
#     LANG = 'pt_PT.UTF-8'
#     WINDOWMANAGER = '/usr/bin/startkde'
#     LESS = '-M -I -R'
#     PROFILEHOME = ''
#     DISPLAY = ':0'
#     JAVA_ROOT = '/usr/lib64/jvm/java'
#     HOSTNAME = 'linux-eu06'
#     SHELL_SESSION_ID = 'cdd70e16c2b5470da27c38607a43356e'
#     CONFIG_SITE = '/usr/share/site/x86_64-unknown-linux-gnu'
#     CSHEDIT = 'emacs'
#     GPG_TTY = '/dev/pts/0'
#     AUDIODRIVER = 'pulseaudio'
#     LESS_ADVANCED_PREPROCESSOR = 'no'
#     COLORTERM = 'truecolor'
#     JAVA_HOME = '/usr/lib64/jvm/java'
#     ALSA_CONFIG_PATH = '/etc/alsa-pulse.conf'
#     MACHTYPE = 'x86_64-suse-linux'
#     XDG_VTNR = '7'
#     QEMU_AUDIO_DRV = 'pa'
#     MINICOM = '-c on'
#     QT_SYSTEM_DIR = '/usr/share/desktop-data'
#     OSTYPE = 'linux'
#     XDG_SESSION_ID = '1'
#     USER = 'leonardo'
#     PAGER = 'less'
#     DESKTOP_SESSION = '/usr/share/xsessions/default'
#     KONSOLE_VERSION = '181203'
#     GTK2_RC_FILES = '/etc/gtk-2.0/gtkrc:/home/leonardo/.gtkrc-2.0:/home/leonardo/.config/gtkrc-2.0'
#     MORE = '-sl'
#     PWD = '//home/leonardo/program'
#     SSH_ASKPASS = '/usr/lib/ssh/ssh-askpass'
#     HOME = '/home/leonardo'
#     HOST = 'linux-eu06'
#     XNLSPATH = '/usr/share/X11/nls'
#     XDG_SESSION_TYPE = 'x11'
#     SDK_HOME = '/usr/lib64/jvm/java'
#     XDG_DATA_DIRS = '/home/leonardo/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share'
#     KONSOLE_DBUS_SESSION = '/Sessions/1'
#     JDK_HOME = '/usr/lib64/jvm/java'
#     XDG_SESSION_DESKTOP = 'KDE'
#     PROFILEREAD = 'true'
#     KONSOLE_DBUS_WINDOW = '/Windows/1'
#     GTK_MODULES = 'canberra-gtk-module'
#     FROM_HEADER = ''
#     MAIL = '/var/spool/mail/leonardo'
#     LESSKEY = '/etc/lesskey.bin'
#     TERM = 'xterm-256color'
#     SHELL = '/bin/bash'
#     KONSOLE_DBUS_SERVICE = ':1.34'
#     XDG_SESSION_CLASS = 'user'
#     XDG_SEAT_PATH = '/org/freedesktop/DisplayManager/Seat0'
#     QT_IM_MODULE = 'xim'
#     XMODIFIERS = '@im=local'
#     LS_OPTIONS = '-N --color=tty -T 0'
#     XCURSOR_THEME = 'breeze_cursors'
#     XDG_CURRENT_DESKTOP = 'KDE'
#     KONSOLE_PROFILE_NAME = 'Predefinição'
#     XDG_SEAT = 'seat0'
#     SHLVL = '2'
#     COLORFGBG = '15;0'
#     LANGUAGE = ''
#     G_FILENAME_ENCODING = '@locale,UTF-8,ISO-8859-15,CP1252'
#     MANPATH = '/usr/local/man:/usr/share/man'
#     GTK_RC_FILES = '/etc/gtk/gtkrc:/home/leonardo/.gtkrc:/home/leonardo/.config/gtkrc'
#     WINDOWID = '54525958'
#     XSESSION_IS_UP = 'yes'
#     LOGNAME = 'leonardo'
#     DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/user/1000/bus'
#     XDG_RUNTIME_DIR = '/run/user/1000'
#     XAUTHORITY = '/home/leonardo/.Xauthority'
#     JRE_HOME = '/usr/lib64/jvm/java/jre'
#     XDG_SESSION_PATH = '/org/freedesktop/DisplayManager/Session0'
#     QT_AUTO_SCREEN_SCALE_FACTOR = '0'
#     XDG_CONFIG_DIRS = '/etc/xdg'
#     PATH = '/home/leonardo/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/leonardo/bin:/usr/local/bin:/usr/bin:/bin'
#     JAVA_BINDIR = '/usr/lib64/jvm/java/bin'
#     KDE_SESSION_UID = '1000'
#     SDL_AUDIODRIVER = 'pulse'
#     KDE_SESSION_VERSION = '5'
#     QT_IM_SWITCHER = 'imsw-multi'
#     G_BROKEN_FILENAMES = '1'
#     HISTSIZE = '1000'
#     SESSION_MANAGER = 'local/linux-eu06:@/tmp/.ICE-unix/1836,unix/linux-eu06:/tmp/.ICE-unix/1836'
#     CPU = 'x86_64'
#     CVS_RSH = 'ssh'
#     LESSOPEN = 'lessopen.sh %s'
#     GTK_IM_MODULE = 'cedilla'
#     OLDPWD = '/home/leonardo'
#     _ = '/usr/bin/buildozer'
#     PACKAGES_PATH = '/home/leonardo/.buildozer/android/packages'
#     ANDROIDSDK = '/home/leonardo/.buildozer/android/platform/android-sdk'
#     ANDROIDNDK = '/home/leonardo/.buildozer/android/platform/android-ndk-r19b'
#     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
leonardo@linux-eu06://home/leonardo/program> 

您必须看到错误,因此您必须安装缺少的任何东西。然后再次运行该命令。我在生成apk文件时也遇到了很多问题,经过4-5个小时的连续调试,我终于成功了。

第一个错误:

检查配置令牌sdkmager路径"home/subshash/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager";不存在,未安装sdkmager。

解决方案:我制作了新文件夹:/home/subshash/DevTools/Android/cmdline-tools

curl -L -O -C - https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip

解压缩上面的文件并将内容复制到上面制作的文件夹下。

打开buildozer.spec文件并修改

android.sdk_path = /home/subhasish/DevTools/Android/cmdline-tools/

以上错误已解决。现在#buildozer android调试给出以下错误:

.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7b__ndk_target_21/libffi/autogen.sh:2:exec:autoreconf:未找到

然后我安装了:

sudo apt-get install automake
sudo apt-get install autoconf  
sudo apt-get install libltdl-dev

再次陷入错误:

引发CommandNotFound(k(
sh.CommandNotFound:zip

sudo apt-get install zip

最后apk创建了,我在手机上进行了测试。它起作用了。

以上输入可能会对某人有所帮助。

看起来缺少patch命令。试着安装它。我不知道opensuse上的包名称是什么,但应该很明显。

相关内容

  • 没有找到相关文章

最新更新