Closed excepterror closed 5 years ago
Are you using Kivy's master branch? In your buildozer.spec you are not, you can do that by writing kivy==master
.
You are correct, I don't. However, the apk won't run because I get this error: descriptor 'property' requires a kivy.event object but received a 'method_descriptor' therefore I cannot verify if setting kivy to master branch fixes the issue. You are probably right, though. Does this mean that one should build his project using kivy's master branch? Moreover, should one install kivy's dev version and work with that instead of using stable 1.10.1? I hope not.
Yes, currently to use python-for-android master you should also use kivy master.
Right, thanks for the answers! I am closing this one.
I’m having the same problem where I set orientation to portrait but it builds the app in landscape anyway. I tried adding kivy==master to spec file, but that did not work for me.
Thanks guys for reporting!
Yes I also add this issue and for me running kivy on master totally helped.
However I had to totally clean my builds and somehow cleaning it with buildozer
commands wasn't enough. So well rm -rf <project_dir>/.buildozer/
I tried doing a clean build with kivy master, but now when I start the app it crashes due to Unable to find any valuable Window provider
error.
python I [CRITICAL] [Window ] Unable to find any valuable Window provider.
me too with master https://paste.city/139
Can somebody fix this issue?
@ivanadam Please open a new issue including the adb logcat output.
@opacam Although there look to be gl errors, I don't understand why you end up with a traceback pointing to an unrelated python library. What happens if you run a trivial app, e.g. just a Label?
:eyes: @inclement... I don't know what are you talking about... Maybe, do you wanted to say @OptimusGREEN?
@opacam Ah, yes, sorry about that.
No problem :wink:
@inclement I'll give it a go, however the label would have to be getting info from Kivy.core.Window which is what's happening in my app. Also if I revert to 1.10.1 then the error goes away.
Also, worth noting that I'm currently building on linux which I'm not used to due to the current MacOS issue with p4a, so unable to test in my usual environment.
Wait @OptimusGREEN the runtime issue you shared has nothing to do with p4a to me:
D Relayout returned: old=[0,0][1080,2076] new=[0,0][1080,2076] result=0x1 surface={valid=true 3744763904} changed=false
python I [CRITICAL] [Window ] Unable to find any valuable Window provider.
I sdl2 - Exception: Unknown <png> type, no loader found.
I File "/home/kivy/Development/git/ogleavetracker/optileave/.buildozer/android/platform/build/build/python-installs/optileave.premium/kivy/core/__init__.
py", line 67, in core_select_lib
I File "/home/kivy/Development/git/ogleavetracker/optileave/.buildozer/android/platform/build/build/python-installs/optileave.premium/kivy/core/window/wi
ndow_sdl2.py", line 140, in __init__
I File "/home/kivy/Development/git/ogleavetracker/optileave/.buildozer/android/platform/build/build/python-installs/optileave.premium/kivy/core/window/__
init__.py", line 968, in __init__
I File "/home/kivy/Development/git/ogleavetracker/optileave/.buildozer/android/platform/build/build/python-installs/optileave.premium/kivy/core/window/wi
ndow_sdl2.py", line 293, in create_window
I File "/home/kivy/Development/git/ogleavetracker/optileave/.buildozer/android/platform/build/build/python-installs/optileave.premium/kivy/core/window/__
init__.py", line 1216, in create_window
I File "kivy/graphics/instructions.pyx", line 783, in kivy.graphics.instructions.RenderContext.__init__
I File "/home/kivy/Development/git/ogleavetracker/optileave/.buildozer/android/platform/build/build/python-installs/optileave.premium/kivy/core/image/__i
nit__.py", line 561, in __init__
I File "/home/kivy/Development/git/ogleavetracker/optileave/.buildozer/android/platform/build/build/python-installs/optileave.premium/kivy/core/image/__i
nit__.py", line 757, in _set_filename
I File "/home/kivy/Development/git/ogleavetracker/optileave/.buildozer/android/platform/build/build/python-installs/optileave.premium/kivy/core/image/__i
nit__.py", line 463, in load
I [INFO ] [MD ] forked KivyMD version: 0.1.2
I [INFO ] [Text ] Provider: sdl2
I Traceback (most recent call last):
I File "/home/kivy/Development/git/ogleavetracker/optileave/.buildozer/android/app/main.py", line 23, in <module>
I File "/home/kivy/Development/git/ogleavetracker/optileave/.buildozer/android/app/libs/md/theming.py", line 14, in <module>
I File "/home/kivy/Development/git/ogleavetracker/optileave/.buildozer/android/app/libs/md/material_resources.py", line 11, in <module>
I AttributeError: 'NoneType' object has no attribute 'width'
I Python for android ended.
This is clearly an issue with KivyMD. Try a more recent version or another fork. Also you would have better luck on Discord support channel
sorry, I didn't explain it properly. This issue has nothing to do with p4a, the ongoing issue I was referring to was https://github.com/kivy/python-for-android/issues/1647 .
That is why I'm currently using linux.
Ok, I just changed kivy==master back to kivy==1.10.1 and the error is gone, I obviously am stuck in landscape but the error only happens with master on android.
its my fork of md I'm using and all the code is doing is asking for the Window.width. Its almost like the the window creation is delayed in master hence the None type object.
Versions
Description
Hello. Lately, I have been working with Pyjnius. For testing purposes I created an app. Orientation was set to 'portrait' and full-screen to '0', however, the app opens in landscape mode and runs in full screen. I believe I am not the first who came across this. Please, have a look at the 6th post, here: https://groups.google.com/forum/#!topic/kivy-users/e9hsuojM_iM
Attached you may find the main.py file. main.txt
buildozer.spec
Command:
Spec file:
Logs