Kivy应用程序无法在android手机上运行,​​但可以在计算机上运行

时间:2019-07-25 15:05:49

标签: python android debian kivy buildozer

我在debian上使用buildozer制作apk时遇到一些问题:当我在debian上启动我的应用程序时,它可以工作,但是当我在Android手机上启动它时,我得到了这个东西:

07-25 19:56:58.939 14073 14190 I python  : Android kivy bootstrap done. __name__ is __main__
07-25 19:56:58.939 14073 14190 I python  : AND: Ran string
07-25 19:56:58.939 14073 14190 I python  : Run user program, change dir and execute entrypoint
07-25 19:56:59.345 14073 14190 I python  : [WARNING] [Config      ] Older configuration version detected (0 instead of 21)
07-25 19:56:59.346 14073 14190 I python  : [WARNING] [Config      ] Upgrading configuration in progress.
07-25 19:56:59.360 14073 14190 I python  : [INFO   ] [Logger      ] Record log in /data/user/0/org.test.myapp/files/app/.kivy/logs/kivy_19-07-25_0.txt
07-25 19:56:59.361 14073 14190 I python  : [INFO   ] [Kivy        ] v1.11.0
07-25 19:56:59.362 14073 14190 I python  : [INFO   ] [Kivy        ] Installed at "/data/user/0/org.test.myapp/files/app/_python_bundle/site-packages/kivy/__init__.pyc"
07-25 19:56:59.363 14073 14190 I python  : [INFO   ] [Python      ] v3.7.1 (default, Jul 23 2019, 20:08:31) 
07-25 19:56:59.363 14073 14190 I python  : [Clang 6.0.2 (https://android.googlesource.com/toolchain/clang 183abd29fc496f55
07-25 19:56:59.365 14073 14190 I python  : [INFO   ] [Python      ] Interpreter at "android_python"
07-25 19:56:59.385 14073 14190 I python  : [ERROR  ] [Clock       ] Unable to import kivy._clock. Have you perhaps forgotten to compile kivy? Kivy contains Cython code which needs to be compiled. A missing kivy._clock often indicates the Cython code has not been compiled. Please follow the installation instructions and make sure to compile Kivy
07-25 19:56:59.387 14073 14190 I python  :  Traceback (most recent call last):
07-25 19:56:59.387 14073 14190 I python  :    File "/home/vlad/test/.buildozer/android/app/main.py", line 8, in <module>
07-25 19:56:59.389 14073 14190 I python  :    File "/home/vlad/test/.buildozer/android/platform/build/build/python-installs/myapp/kivy/app.py", line 319, in <module>
07-25 19:56:59.390 14073 14190 I python  :    File "/home/vlad/test/.buildozer/android/platform/build/build/python-installs/myapp/kivy/base.py", line 26, in <module>
07-25 19:56:59.392 14073 14190 I python  :    File "/home/vlad/test/.buildozer/android/platform/build/build/python-installs/myapp/kivy/clock.py", line 363, in <module>
07-25 19:56:59.395 14073 14190 I python  :  ImportError: dlopen failed: library "libpython2.7.so" not found
07-25 19:56:59.395 14073 14190 I python  : Python for android ended.

(日志来自logcat)

该如何解决?

P.S。这是我的buildozer.spec:https://pastebin.com/DrVeqXt2

1 个答案:

答案 0 :(得分:0)

我找到了解决方案-我刚刚使用vevnv并安装了所有必需的库。