【发布时间】:2018-01-04 15:37:32
【问题描述】:
包装我使用了 kivy 手册中推荐的工具 我用于来自https://kivy.org/#download 的 kivy 打包虚拟机(Oracle 虚拟框和虚拟机设置) 对于 buildozer 安装,我使用了进程 https://github.com/kivy/buildozer,用于 Python 3。 我手动添加到 buildozer.spec 文件行:
requirements = python3crystax,kivy
android.ndk_path = ~/buildozer/crystax-ndk
log_level = 2
包装由下一段文字描述:
. . .
. . .
. . .
[INFO]: Unpacking sdl2_image for armeabi-v7a
[INFO]: -> running basename https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.1.tar.gz
[INFO]: -> directory context /media/sf_ForBuildozer/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python3crystax/jni
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 "/media/sf_ForBuildozer/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 978, in <module>
main()
File "/media/sf_ForBuildozer/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 975, in main
ToolchainCL()
File "/media/sf_ForBuildozer/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 512, in __init__
getattr(self, args.subparser_name.replace('-', '_'))(args)
File "/media/sf_ForBuildozer/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 149, in wrapper_func
build_dist_from_args(ctx, dist, args)
File "/media/sf_ForBuildozer/.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 559, in build_recipes
File "pythonforandroid/recipe.py", line 520, in prepare_build_dir
File "pythonforandroid/recipe.py", line 422, in unpack
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 1245, in __call__
return RunningCommand(cmd, call_args, stdin, stdout, stderr)
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 633, in __init__
self.wait()
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 651, in wait
self.handle_command_exit_code(exit_code)
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 672, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_2: <exception str() failed>
# Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3crystax,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/media/sf_ForBuildozer/.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
我的问题:如果我为 python 3 使用 buildozer 安装,为什么使用 python 2.7?它是我的问题的根源吗?
【问题讨论】: