简体   繁体   English

通过 buildozer 将 py 文件编译为 apk 时出现问题

[英]There's a problem when I compile py file to apk through buildozer

When compile a very simple "Hello World" kivy file to apk.将一个非常简单的“Hello World”kivy 文件编译为 apk 时。 But an error occured.但是发生了错误。

I am nervous.我很紧张。 This is the log:这是日志:

[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

============================================================================= It's just a pretty simple py with kivy file but I don't expected to get this Error. ==================================================== =========================== 这只是一个带有 kivy 文件的非常简单的 py,但我不希望得到这个错误。 So Please Help me!!所以请帮助我! Many Thanks!!!非常感谢!!!

Update: After installed autoconf, I tried to compile again, but another error occured.更新:安装autoconf后,我尝试再次编译,但又出现了一个错误。

Log:日志:

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:

I need to compile it now, but I don't know how to fix it.我现在需要编译它,但我不知道如何修复它。 Please help me again!请再次帮助我! Many thanks非常感谢

You are missing the libtool library.您缺少libtool库。 This command should solve your problem.该命令应该可以解决您的问题。

sudo apt-get update
sudo apt-get install libtool

Reference link参考链接

This might help you as well 这也可能对您有所帮助

You need to install the autoconf package:您需要安装autoconf package:

sudo apt-get install autoconf

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 当我编译到.apk 时,Buildozer 不工作 - Buildozer isn't working when I compile to .apk 使用 buildozer 为 kivy 项目构建 apk 文件时 Gradle 的问题 - Problem with Graddle when building apk file for kivy project using buildozer 使用 Buildozer 创建 apk 文件的问题 - Problem with creating an apk file using Buildozer Buildozer问题。 我尝试为Android制作APK文件,但我无法 - Buildozer Problem. I try to make apk file for android, but i cant 使用 buildozer 创建 apk 时出现错误 - I have an error when creating the apk with buildozer 我是 Kivy 和使用 buildozer 的新手。我制作了一个 apk,但是当我打开它时它崩溃了 - I am new to Kivy and using buildozer.I making an apk but it's crash when i open it 使用 buildozer 在 android 上构建 apk 时出现问题 - Problem with building apk on android with buildozer 我一打开使用buildozer的APK文件即可关闭 - Apk file build using buildozer closes as soon as i open it 使用 kivy 和 buildozer 将 PY 转换为 APK -(ImportError: OpenCV 加载程序:缺少配置文件:['config.py']。检查 Z5BD4C87976F48E6A55919D53E140 安装) - PY to APK conversion with kivy and buildozer - (ImportError: OpenCV loader: missing configuration file: ['config.py']. Check OpenCV installation ) 使用 buildozer 构建 apk 时 gradlew assembleDebug 失败 - gradlew assembleDebug failing when building apk with buildozer
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM