2

I am using VirtualBox wih Ubuntu 20.04.1 and have installed kivymd version 0.104.2dev0 and kivy version 2.0.0. However, when I run the app on my phone alongside buildozer android logcat, it says that the kivy version is v1.11.1 and kivymd version v0.104.1. I think this is what is causing the errors in my app (and hence won't run).

I've already tried putting the specfic versions in the buildozer.spec file, which still didn't work. Any advice would be great! (if you need the full log I can provide it)

Screenshot 1 Screenshot 2

TomBentIt
  • 63
  • 7

1 Answers1

4

It doesn't matter what version of kivy, kivymd is installed on your system. The version that gets packed with the app is downloaded while packing and it downloads the version specified in buildozer.spec file. So what you have to do is in the requirements of your buildozer.spec file instead of writing requirements=python3,kivy write requirements=python3,kivy==2.0.0. This will make sure that v2.0.0 is installed. Also, after specifying this you might have to rebuild your app by deleting .buildozer directory present in the directory where you are running buildozer. One thing to notice is that it's .buildozer not just buildozer and will be present in the directory where you initialized buildozer i.e where buildozer.spec file is. You can type rm -rf .buildozer in that directory to remove it. After that, you have to rebuild your apk using buildozer android debug deploy run

Ankit Sangwan
  • 1,138
  • 1
  • 7
  • 20
  • I'm having trouble getting the right version of Kivymd. I've tried specifying it as: `kivymd==0.104.2.dev0`, `kivymd==0.104.2` and `kivymd==https://github.com/kivymd/KivyMD/archive/master.zip`. All of these return errors that read `No matching distribution found for (kivymd==0.104.2dev0)` (or whatever I inputted in buildozer.spec). Is there any other way to specify the KivyMD version? – TomBentIt Jan 03 '21 at 14:20
  • 1
    Buildozer use the v0.104.1 of kivymd which is pretty new so I usually don't specify the version of kivymd. Still if you wanna specify you have to specify it like `requirements = kivy, python3, git+https://github.com/kivymd/KivyMD.git@master,.....` You dont have to add kivyms==https://github.com/... – Ankit Sangwan Jan 03 '21 at 17:26
  • I entered `git+https://github.com/kivymd/KivyMD.git@master` and it is still using v0.104.1 when building. Any other ideas? – TomBentIt Jan 03 '21 at 19:23
  • 1
    Have you rebuilt it? After entering `git+https://github.com/kivymd/KivyMD.git@master` in requirements delete the `.buildozer` directory then run buildozer again. – Ankit Sangwan Jan 04 '21 at 04:21