简体   繁体   中英

Kivy app doesn't work on android phone, although it works on the computer

I have some problems with making apk using buildozer on debian: when I launch my app on debian it works, but when I launch it on my android phone I get this :

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.

(logs are from logcat)

What can I do to fix it?

PS Here is my buildozer.spec: https://pastebin.com/DrVeqXt2

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM