Buildozer在构建用于Android发布的Kivy框架的Pong应用时出错

时间:2018-12-04 12:44:54

标签: android python kivy buildozer

我正在尝试使用Pong App(https://kivy.org/doc/stable/tutorials/pong.html)的buildozer制作apk文件

但是在运行buildozer最后一步时出现以下错误。

Traceback (most recent call last):
  File "/usr/local/bin/buildozer", line 11, in <module>
    load_entry_point('buildozer==0.38.dev0', 'console_scripts', 'buildozer')()
  File "/usr/local/lib/python2.7/dist-packages/buildozer/scripts/client.py", line 13, in main
    Buildozer().run_command(sys.argv[1:])
  File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 1053, in run_command
    targets = [x[0] for x in self.targets()]
  File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 945, in targets
    fromlist=['buildozer'])
  File "/usr/local/lib/python2.7/dist-packages/buildozer/targets/android_new.py", line 10, in <module>
    from buildozer.targets.android import TargetAndroid
  File "/usr/local/lib/python2.7/dist-packages/buildozer/targets/android.py", line 28, in <module>
    import sh
ImportError: No module named sh

请让我知道继续制作apk文件的解决方法

参考:https://kivy.org/doc/stable/guide/packaging-android.html

1 个答案:

答案 0 :(得分:0)

因此,似乎Buidozer在找到sh软件包时遇到了问题。看一下https://www.pythonforbeginners.com/modules-in-python/how-to-use-sh-in-python。别难过,我在Buildozer上也有类似的经历。