我是android应用程序开发的新手。我尝试使用buildozer构建我的第一个android应用。我使用pip进行安装(按照this网站上的说明进行操作)。 然后,我尝试使用this步骤来构建python kivy应用程序,成功创建了.spec文件,但是此命令:
buildozer -v android debug
返回了这些错误,我真的不知道该怎么办:
.
.
.
[INFO]: Building sdl2_mixer for armeabi-v7a
[INFO]: Building sdl2_ttf for armeabi-v7a
[INFO]: Building python2 for armeabi-v7a
[INFO]: Copying hostpython binary to targetpython folder
[INFO]: -> running cp /home/janka/PycharmProjects...(and 214 more)
[INFO]: Building sdl2 for armeabi-v7a
[INFO]: -> directory context /home/janka/PycharmProjects/pokus/.buildozer/android/platform/build/build
/bootstrap_builds/sdl2_gradle-python2/jni
[INFO]: -> running ndk-build V=1
Exception in thread background thread for pid 32735:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/janka/.local/lib/python2.7/site-packages/sh.py", line
2170, in background_thread
handle_exit_code(exit_code)
File "/home/janka/.local/lib/python2.7/site-packages/sh.py", line 1929, in fn
return self.command.handle_command_exit_code(exit_code)
File "/home/janka/.local/lib/python2.7/site-packages/sh.py", line 672, in handle_command_exit_code
raise exc
ErrorReturnCode_255:
RAN: /home/janka/.buildozer/android/platform/android-ndk-r9c/ndk-build V=1
STDOUT:
STDERR:
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File
"/home/janka/PycharmProjects/pokus/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 978, in <module>
main()
File
"/home/janka/PycharmProjects/pokus/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 975, in main
ToolchainCL()
File
"/home/janka/PycharmProjects/pokus/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 512, in
__init__
getattr(self, args.subparser_name.replace('-', '_'))(args)
File
"/home/janka/PycharmProjects/pokus/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 149, in wrapper_func
build_dist_from_args(ctx, dist, args)
File
"/home/janka/PycharmProjects/pokus/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 193, in build_dist_from_args
build_recipes(build_order, python_modules, ctx)
File "pythonforandroid/build.py", line 573, in build_recipes
File
"/home/janka/PycharmProjects/pokus/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/sdl2/__init__.py", line 32, in build_arch
shprint(sh.ndk_build, "V=1", _env=env)
File "pythonforandroid/logger.py", line 175, in shprint
File "/home/janka/.local/lib/python2.7/site-packages/sh.py", line 720, in next
self.wait()
File "/home/janka/.local/lib/python2.7/site-packages/sh.py", line 651, in wait
self.handle_command_exit_code(exit_code)
File "/home/janka/.local/lib/python2.7/site-packages/sh.py", line 672, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_255:
(这看起来像是python错误,但是我以前从未见过这样的东西。)能否请您告诉我,“ sh.ErrorReturnCode_255”是什么意思?
RAN: /home/janka/.buildozer/android/platform/android-ndk-r9c/ndk-build V=1
STDOUT:
STDERR:
# Command failed: /usr/bin/python -m pythonforandroid.toolchain create
--dist_name=myapp --bootstrap=sdl2 --requirements=kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/janka/PycharmProjects/pokus/.buildozer/android/platform/build
#
# 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
janka@janka-VirtualBox:~/PycharmProjects/pokus$
如果您能告诉我,我做错了什么,我可以做些什么来使它正常工作,我将不胜感激。