DEV Community

Discussion on: How to use Google Colab to package KivyMD applications with buildozer.

Collapse
 
ngonidzashe profile image
Ngonidzashe Nzenze

Hello. Did you try adding pillow to the requirements in the buildozer.spec file?

Collapse
 
pythonkivyuser profile image
PythonKivyuser

I've tried it with
[requirements = kivy==2.0.0, github.com/kivymd/KivyMD/archive/m...]
as the developers published it on Github(github.com/kivymd/KivyMD)
and with
[requirements = python3, kivy==2.0.0, kivymd==0.104.2, sdl2_ttf == 2.0.15, pillow]

In both cases the adb logcat log showed me the two Errors.
Have i forgotten something?

Thread Thread
 
ngonidzashe profile image
Ngonidzashe Nzenze

Have you tried running:

buildozer android clean

between the changes? If not, try running it and using the following requirements:

requirements = python3,kivy==2.0.0,github.com/kivymd/KivyMD/archive/m..., sdl2_ttf==2.0.15,pillow

If you have tried this and still gotten the error, could you please provide the logs.
I'm pretty sure that adding pillow to the requirements was supposed to work.

Thread Thread
 
pythonkivyuser profile image
PythonKivyuser

I've tried running buildozer with your mentioned requirements and it worked finally. Thank you very much for taking your time and for your help. 🥳
I'm so happy that the "compilation" is working.

A new small problem accoured with a more advanced kivy code. The code runs at the PC but not on my phone. [ TypeError: 'int' object is not iterable ]

Is this a typical error? And is the KivyMD/Python code the problem?

Thread Thread
 
ngonidzashe profile image
Ngonidzashe Nzenze

Awesome, I'm glad that worked.

I think the TypeError is probably a bug in your code. It means somewhere your code is trying to iterate over an int object. Try to look through your code for possible causes if the log is not returning the line causing the error.

Collapse
 
jhosuaromero30 profile image
jhosua romero

Hey, could you help me with my app?, I've been trying several ways in builderdozer and I still can't get the app to work, it closes when I open it, I use kivymd, pillow in the requirements.

Thread Thread
 
ngonidzashe profile image
Ngonidzashe Nzenze

Hello.
Are you developing the application described in this article or another?

Some comments have been hidden by the post's author - find out more