I’m a new developer working in an android app with kivy and kivymd, I can compile it without trouble, but when it comes to run it on the devices, I get python errors located in files that are created automatically when compiling with buildozer. This is the error log looking at adb logcat:
Traceback (most recent call last):
File “/mnt/d/ProyectosPython/galapp/src/.buildozer/android/app/main.py”, line 8, in
File “/mnt/d/ProyectosPython/galapp/src/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/APPGalileo/arm64-v8a/kivymd/app.py”, line 51, in
File “/mnt/d/ProyectosPython/galapp/src/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/APPGalileo/arm64-v8a/kivymd/theming.py”, line 235, in
File “/mnt/d/ProyectosPython/galapp/src/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/APPGalileo/arm64-v8a/kivymd/material_resources.py”, line 20, in
File “/mnt/d/ProyectosPython/galapp/src/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/APPGalileo/arm64-v8a/kivymd/material_resources.py”, line 20, in
AttributeError: ‘NoneType’ object has no attribute ‘width’
My buildozer.spec requirements is the next:
requirements = python3,kivy==2.3.0,mysql-connector,pillow,requests,sdl2,kivymd==1.1.1
I’ve tried the newer versions of both kivy and kivymd as well as a few older versions, they all give me the same error. In the “material_resources.py” file, the line that displays the error is the following:
DEVICE_TYPE = “desktop”
elif Window.width >= dp(600) and Window.height >= dp(600):
The app works perfectly while on pc, but not after compiling to apk. It’s gotten to the point where I don’t know what else to do. Any help is useful, thanks in advance 🙂