1

I am having a couple of problems packaging my Kivy app for android which may, or may not be related:

  • The only packages my app imports other than Kivy, are the time, and math modules. When I add either or both of them to the requirements in the buildozer spec file, I get a "pip._internal.exceptions.DistributionNotFound: No matching distribution for time." error. When I don't include them in my requirements, the build is successful, but crashes upon open with the error:
  • "Exception: The version of Kivy installed on this system is too old. (You have 1.11.1, but the application requires 2.0.0)"

I am doing the install in a VirutalBox on Ubuntu, and have followed the installation procedure outlined in the Kivy, and Buildozer documentation, as well as following a tutorial by Eric Sandberg on YouTube. I have set the Kivy version in the buildozer spec file, and installed Kivy 2.0.0 on the VM using pip. When I pip freeze, it shows the correct version of Kivy. One thing I have noticed is the when I try and install it with "apt-get install python3-kivy", it says kivy 1.10 is installed and that this is the most up to date version.

This seems like an easy problem to address but I have cannot figure out why it is trying to use this version of Kivy! Please let me know if any other information is required to debug. The spec file is hardly changed, other then specifying Kivy=2.0.0 in requirements.

Here are the logs: error logs

Here are the requirements: requirements

  • The versions of kivy you have installed locally are irrelevant, buildozer fetches its own, so only the version set in the buildozer.spec matters. What is your requirements line, and have you cleaned the build fully since setting the version explicitly? – inclement Dec 31 '20 at 18:54
  • Also if you take out the `require` you'll probably find kivy 1.11 works fine for you – inclement Dec 31 '20 at 18:54
  • I have added a pic of my requirements. What do you mean by cleaning the build? – Louis George Dec 31 '20 at 19:00
  • My fallback will be to redo the process with python3.7 and kivy 1.11.1, would much rather figure this out though, as it seems like probably one line somewhere needs to be changed. – Louis George Dec 31 '20 at 19:01
  • 1
    Delete the .buildozer directory in your build dir, and then run buildozer again – inclement Dec 31 '20 at 19:13
  • Wow. That did it haha. built successfully and then crashed.. but this time due to a new error to do with some stuff inside the app implying it got past the versioning problem! Cheers – Louis George Dec 31 '20 at 19:44

1 Answers1

5
  1. You don't have to add math and time in requirements of your buildozer.spec file as they are inbuild modules in python. So, they will automatically get added when you add python3 in your requirements.
  2. To use a newer versio version of kivy you have to specify it in your requirements. In requirements you have to add like requirements=python3,kivy==2.0.0rc4 or any other version you want to use. Also, after changing requirements you might have to rebuild you package. You have to delete .buildozer directory and again run the buildozer using buildozer android debug deploy run
Ankit Sangwan
  • 1,138
  • 1
  • 7
  • 20