buildozer
buildozer copied to clipboard
Python 3.9 failing to load kivy
Obfusk's patches for python-for-android: https://github.com/kivy/python-for-android/pull/2337/files/f55af300a95eccec877a21ab12456bec906988a5
OK I got around to testing obfusk's patch, something still needs patching: TEST SETUP AS FOLLOWS:
Python 3.8 buildozer test with obfusk's patches: buildozer.spec: (relevant lines for testing helloworld from kivy site) requirements = python3==3.8.6,hostpython3==3.8.6,kivy==2.0.0rc4,https://github.com/kivymd/KivyMD/archive/master.zip,pygments,sdl2_ttf==2.0.15 #obfusk's patches p4a.source_dir = %(source.dir)s/../python-for-android RESULTS from logcat on Pixel 4 XL: (PASS) http://sunsaturn.com/kivy/3.8.txt
Python 3.9 buildozer test with obfusk's patches: buildozer.spec: (relevant lines for testing helloworld from kivy site) requirements = python3==3.9.0,hostpython3==3.9.0,kivy==2.0.0rc4,https://github.com/kivymd/KivyMD/archive/master.zip,pygments,sdl2_ttf==2.0.15 #obfusk's patches p4a.source_dir = %(source.dir)s/../python-for-android RESULTS from logcat on Pixel 4 XL: (FAIL) http://sunsaturn.com/kivy/3.9.txt
Additional comments: only thing that affects it failing is (python3==3.9.0,hostpython3==3.9.0) after running numerous tests with different modules like kivymd or just setting python3==3.9.0,hostpython3==3.9.0,kivy==2.0.0rc4 only in requirements line. As you can see from logs, kivy is not getting loaded for some reason
This is a bug in kivy.
Nice job finding that kivy bug obfusk. If we can get these commits in kivy master and on python-for-android, whole world can start using python 3.9 on android 👍
is it fixed by now?? as I checked Python 3.9 don't have Python 2 supports. so it should be quite lighter than the older 3.* versions and its should be helpful for building smaller apk i guess
AFAIK it's fixed, but you need to use kivy==master,python3==3.9.1,hostpython3==3.9.1 (for now).
getting too many errors. Re-running and will send the error messages here
AFAIK it's fixed, but you need to use
kivy==master,python3==3.9.1,hostpython3==3.9.1(for now).
here are the logs. using ubuntu (actually lubuntu due to storage shortage) 20.04 and builtin python3.8.1
.spec file: buildoze.spec pastebin terminal log: terminal log pastebin
@Ratulhasan14789
You also need p4a.branch = develop.
And the second paste you linked gives me a 403 error.
01-11 20:14:22.728 16052 16090 I python : Android kivy bootstrap done. name is main
01-11 20:14:22.728 16052 16090 I python : AND: Ran string
01-11 20:14:22.728 16052 16090 I python : Run user program, change dir and execute entrypoint
01-11 20:14:22.844 16052 16090 I python : Traceback (most recent call last):
01-11 20:14:22.844 16052 16090 I python : File "/home/dan/python/apps/sunsaturn/helloworld/.buildozer/android/app/main.py", line 5, in
develop branch breaks other things however: my typical build specs: requirements = python3==3.9.0,hostpython3==3.9.0,kivy==2.0.0,https://github.com/kivymd/KivyMD/archive/master.zip,aiomysql,pymysql,setuptools==51.0.0,pygments,sdl2_ttf== 2.0.15 OR: requirements = python3==3.8.6,hostpython3==3.8.6,kivy==2.0.0,https://github.com/kivymd/KivyMD/archive/master.zip,aiomysql,pymysql,setuptools==51.0.0,pygments,sdl2_ttf== 2.0.15
will break under p4a.branch=develop
Hold up on that, it's for some reason breaking on master branch as well all of a sudden.
Ok I looked into that error seems was just someone updated pymysql and that broke aiomysql was able to fix under python 3.8.6 with: requirements = python3==3.8.6,hostpython3==3.8.6,kivy==2.0.0,https://github.com/kivymd/KivyMD/archive/master.zip,aiomysql==0.0.21,pymysql==0.9.3,setuptools==51.0.0,pygments,sdl2_ttf==2.0.15
p4a.branch = develop
SO I ran a simple hello world example test with: p4a.branch = develop requirements = python3==3.9.0,hostpython3==3.9.0,kivy==2.0.0rc4 also: requirements = python3==3.9.1,hostpython3==3.9.1,kivy==2.0.0 also: requirements = python3==3.9.0,hostpython3==3.9.0,kivy==2.0.0
All of them all of a sudden DO NOT load kivy. So kivy codebase is broken once again....
It should be noted simply replacing with 3.8.6 works in all examples including post before this one, so something is broken in kivy core again.
This was working in December, not sure what happened.
Unfortunately, the fix in kivy didn't make it into 2.0.0. ATM you need to use master.