当我通过构建器将py文件编译为apk时出现问题



将一个非常简单的"Hello World"kivy文件编译到apk时。但是出现了一个错误。

我很紧张。这是日志:

[INFO]:    -> running autogen.sh
Exception in thread background thread for pid 10006:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 1540, in wrap
fn(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 2459, in background_thread
handle_exit_code(exit_code)
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 2157, in fn
return self.command.handle_command_exit_code(exit_code)
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_127:
RAN: /mnt/d/project1/test/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/autogen.sh
STDOUT:
/mnt/d/project1/test/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/autogen.sh: 2: exec: autoreconf: not found

STDERR:

Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1192, in <module>
main()
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
ToolchainCL()
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 668, in __init__
getattr(self, args.subparser_name.replace('-', '_'))(args)
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 153, in wrapper_func
build_dist_from_args(ctx, dist, args)
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 206, in build_dist_from_args
args, "ignore_setup_py", False
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 577, in build_recipes
recipe.build_arch(arch)
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/libffi/__init__.py", line 33, in build_arch
shprint(sh.Command('./autogen.sh'), _env=env)
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 180, in shprint
for line in output:
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 863, in next
self.wait()
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 792, in wait
self.handle_command_exit_code(exit_code)
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_127:
RAN: /mnt/d/project1/test/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/autogen.sh
STDOUT:
/mnt/d/project1/test/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/autogen.sh: 2: exec: autoreconf: not found

=============================================================================这只是一个非常简单的py和kivy文件,但我没想到会得到这个错误。所以请帮帮我!!非常感谢!!!

更新:安装autoconf后,我试图再次编译,但发生了另一个错误。

日志:

Exception in thread background thread for pid 9679:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 1540, in wrap
fn(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 2459, in background_thread
handle_exit_code(exit_code)
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 2157, in fn
return self.command.handle_command_exit_code(exit_code)
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /mnt/d/project1/test/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/autogen.sh
STDOUT:
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure.ac:41: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

STDERR:

Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1192, in <module>
main()
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
ToolchainCL()
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 668, in __init__
getattr(self, args.subparser_name.replace('-', '_'))(args)
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 153, in wrapper_func
build_dist_from_args(ctx, dist, args)
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 206, in build_dist_from_args
args, "ignore_setup_py", False
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 577, in build_recipes
recipe.build_arch(arch)
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/libffi/__init__.py", line 33, in build_arch
shprint(sh.Command('./autogen.sh'), _env=env)
File "/mnt/d/project1/test/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 180, in shprint
for line in output:
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 863, in next
self.wait()
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 792, in wait
self.handle_command_exit_code(exit_code)
File "/usr/local/lib/python3.5/dist-packages/sh-1.12.14-py3.5.egg/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /mnt/d/project1/test/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/autogen.sh
STDOUT:
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
configure.ac:41: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

STDERR:

我现在需要编译它,但我不知道如何修复它。请再次帮助我!非常感谢

您缺少libtool库。这个命令应该可以解决您的问题。

sudo apt-get update
sudo apt-get install libtool

参考链路

这可能对你也有帮助

您需要安装autoconf软件包:

sudo apt-get install autoconf

相关内容

  • 没有找到相关文章

最新更新