buildozer build with python 3.9.2

579 views
Skip to first unread message

Dmytro Kravchenko

unread,
Mar 30, 2021, 12:25:09 PM3/30/21
to Kivy users support
We can run our application with version 3.9.2?
I try do this, but app don't start on android...
I change(add) in buildozer.spec:
requirements = python3==3.9.2,hostpython3==3.9.2,.....(and another things)

buildozer android debug deploy run

app compile and send on my phone, but do not run, this log:

```
03-30 17:55:00.790 10489 10520 I python  : [INFO   ] [Logger      ] Record log in /data/user/0/org.test.myapp/files/app/.kivy/logs/kivy_21-03-30_4.txt
03-30 17:55:00.790 10489 10520 I python  : [INFO   ] [Kivy        ] v2.0.0
03-30 17:55:00.790 10489 10520 I python  : [INFO   ] [Kivy        ] Installed at "/data/user/0/org.test.myapp/files/app/_python_bundle/site-packages/kivy/__init__.pyc"
03-30 17:55:00.790 10489 10520 I python  : [INFO   ] [Python      ] v3.9.2 (default, Mar 30 2021, 17:25:08) 
03-30 17:55:00.790 10489 10520 I python  : [Clang 8.0.2 (https://android.googlesource.com/toolchain/clang 40173bab62ec7462
03-30 17:55:00.790 10489 10520 I python  : [INFO   ] [Python      ] Interpreter at ""
03-30 17:55:00.803 10489 10520 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
03-30 17:55:00.803 10489 10520 I python  :  Traceback (most recent call last):
03-30 17:55:00.803 10489 10520 I python  :    File "/home/sk2000/PycharmProjects/zweryfikowac/.buildozer/android/app/main.py", line 1, in <module>
03-30 17:55:00.803 10489 10520 I python  :    File "/home/sk2000/PycharmProjects/zweryfikowac/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/kivy/core/window/__init__.py", line 17, in <module>
03-30 17:55:00.803 10489 10520 I python  :    File "/home/sk2000/PycharmProjects/zweryfikowac/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/kivy/clock.py", line 466, in <module>
03-30 17:55:00.804 10489 10520 I python  :  ModuleNotFoundError: No module named 'kivy._clock'
03-30 17:55:00.804 10489 10520 I python  : Python for android ended.

```

I think problem is:
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

But with python 3.8.5 it works without this error.
with without this:
python3==3.9.2,hostpython3==3.9.2
And in log from my phone i have patch from computer "/home/sk2000/Pyc....."
but without
python3==3.9.2,hostpython3==3.9.2
What i do wrong?

Alexander Taylor

unread,
Mar 30, 2021, 12:40:01 PM3/30/21
to Kivy users support
Does the default Python version work?

What about 3.9.1?

Dmytro Kravchenko

unread,
Mar 30, 2021, 12:45:00 PM3/30/21
to Kivy users support
on python 3.8.5 all is good, but I wanted to use some things from python 3.9.2, it's better =) now i try use kivy from master on github, i found something like this:

вторник, 30 марта 2021 г. в 18:40:01 UTC+2, alexander...@gmail.com:

Dmytro Kravchenko

unread,
Mar 30, 2021, 1:11:34 PM3/30/21
to Kivy users support
With 3.9.1 same 
____
```
03-30 19:10:10.314 19817 19847 I python  : [INFO   ] [Logger      ] Record log in /data/user/0/org.test.myapp/files/app/.kivy/logs/kivy_21-03-30_1.txt
03-30 19:10:10.314 19817 19847 I python  : [INFO   ] [Kivy        ] v2.0.0
03-30 19:10:10.314 19817 19847 I python  : [INFO   ] [Kivy        ] Installed at "/data/user/0/org.test.myapp/files/app/_python_bundle/site-packages/kivy/__init__.pyc"
03-30 19:10:10.314 19817 19847 I python  : [INFO   ] [Python      ] v3.9.1 (default, Mar 30 2021, 19:05:22) 
03-30 19:10:10.314 19817 19847 I python  : [Clang 8.0.2 (https://android.googlesource.com/toolchain/clang 40173bab62ec7462
03-30 19:10:10.315 19817 19847 I python  : [INFO   ] [Python      ] Interpreter at ""
03-30 19:10:10.331 19817 19847 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
03-30 19:10:10.331 19817 19847 I python  :  Traceback (most recent call last):
03-30 19:10:10.331 19817 19847 I python  :    File "/home/sk2000/PycharmProjects/zweryfikowac/.buildozer/android/app/main.py", line 1, in <module>
03-30 19:10:10.331 19817 19847 I python  :    File "/home/sk2000/PycharmProjects/zweryfikowac/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/kivy/core/window/__init__.py", line 17, in <module>
03-30 19:10:10.331 19817 19847 I python  :    File "/home/sk2000/PycharmProjects/zweryfikowac/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/kivy/clock.py", line 466, in <module>
03-30 19:10:10.331 19817 19847 I python  :  ModuleNotFoundError: No module named 'kivy._clock'
03-30 19:10:10.331 19817 19847 I python  : Python for android ended.

```

вторник, 30 марта 2021 г. в 18:40:01 UTC+2, alexander...@gmail.com:
Does the default Python version work?

Dmytro Kravchenko

unread,
Mar 30, 2021, 1:34:50 PM3/30/21
to Kivy users support
I check, is work with requirements = python3==3.8.5,hostpython3==3.8.5,...... all work, but if get from master do not compile =(,. some error, from master i get this link from github https://github.com/kivy/kivy/archive/refs/heads/master.zip and on ide too not install with command, have some error

pip install  https://github.com/kivy/kivy/archive/refs/heads/master.zip

in Linux it work, but builldozer use 3.8.5 on android, I use 3.9.2 on desktop, and it's bad =)
I must use 3.8.5, but 3.9.2 is some better =)

Kivy work on android with 3.9.2 or 3.9.1 version?

вторник, 30 марта 2021 г. в 19:11:34 UTC+2, Dmytro Kravchenko:

Dmytro Kravchenko

unread,
Mar 30, 2021, 5:10:39 PM3/30/21
to Kivy users support
It works with kivy==master, but kivymd maybe don't =( I have new error when use my app on phone... I'm crying =(

d-armeabi-v7a/build/python-installs/myapp/kivy/lang/builder.py", line 711, in _apply_rule
03-30 22:54:10.470  4631  4667 I python  :  kivy.lang.builder.BuilderException: Parser: File "<inline>", line 16:
03-30 22:54:10.470  4631  4667 I python  :  ...
03-30 22:54:10.470  4631  4667 I python  :       14:    size_hint: None, None
03-30 22:54:10.470  4631  4667 I python  :       15:    height: dp(20) + lbl_txt.texture_size[1]
03-30 22:54:10.470  4631  4667 I python  :  >>   16:    width: lbl_txt.texture_size[0] + dp(24)
03-30 22:54:10.470  4631  4667 I python  :       17:
03-30 22:54:10.471  4631  4667 I python  :       18:    MDLabel:
03-30 22:54:10.471  4631  4667 I python  :  ...
03-30 22:54:10.471  4631  4667 I python  :  TypeError: Cannot convert kivy.properties.NumericPropertyStorage to kivy.properties.BoundedNumericPropertyStorage


вторник, 30 марта 2021 г. в 19:34:50 UTC+2, Dmytro Kravchenko:

Dmytro Kravchenko

unread,
Mar 31, 2021, 4:49:53 AM3/31/21
to Kivy users support
Ok, I do many tested and has concluded, I can't use python3.9, It's so new for kivy and kivymd, and I get answer from developer kivymd what kivy officially don't support python3.9 now, and we can normally work on before version 3.9. And this error is famous:
https://stackoverflow.com/questions/66808135/buildozer-build-the-apk-but-dont-work-on-android
I hope that soon we will be able to use python3.9 for our apps on android without problems. 
вторник, 30 марта 2021 г. в 23:10:39 UTC+2, Dmytro Kravchenko:

Robert

unread,
Mar 31, 2021, 12:40:19 PM3/31/21
to Kivy users support
Looks like most of the work has been done, https://github.com/kivy/python-for-android/pull/2337
But I expect there are still issues to look at.
Reply all
Reply to author
Forward
0 new messages