Deploying Your Kivy/Python App to Android with Buildozer

Follow along with me as I deploy a simple Hello World Python/Kivy application to an Android phone. I used a Windows machine running an Ubuntu 18.04 image in VirtualBox since buildozer doesn’t run directly on Windows.👇 LINKS AND INFO! 👇


Step 1) Download Virtualbox

Step 2) Download an Ubuntu 18.04 image

Step 3) Make sure your phone is in Developer mode by going to Settings –…

Similar Posts

34 thoughts on “Deploying Your Kivy/Python App to Android with Buildozer
  1. What a sick intro.

    I wrote all of the steps down in the description of today's video, so you can copy/paste commands into the command line if you want! Good luck getting your apps on Android everyone!

  2. Fantastic work here, just wanted to add that the developer must make sure that cython is installed in the system and not only virtual env as it will throw up some error messages,

  3. Hey, can you help me with my error? I keep getting errors whenever i add wav and gif to the include_exts= and also ffpyplayer in the requirements=
    But if dont add them my app works fine on my phone, but the audio wont load(they're all wav files) also the gif files. Any chance that you can help me? Thanks

  4. hi,
    i got this message at the end:
    # Buildozer failed to execute the last command

    # The error might be hidden in the log above this error

    # Please read the full log, and search for it before

    # raising an issue with buildozer itself.

    # In case of a bug report, please add a full log with log_level = 2
    can someone help me please

  5. Thanks a lot for the great effort bro. I get an error when I try to install long code. It says "unable to locate package zlibg-dev"
    Can you help?

  6. Erik (or someone else who's reading it), there is no technology of virtualization on my computer, do you know some other way of creating apk file for Android without Buildozer on Windows 10 ? I would be very grateful for answer, thank you!

  7. i got an error but i cant fix it. can you tell me about this error?.

    [INFO]: -> running bash -c venv/bin/pip install Cython

    working: Could not fetch URL…(and 255 more)

    Exception in thread background thread for pid 47391:

    Traceback (most recent call last):

    File "/usr/local/lib/python3.8/", line 932, in _bootstrap_inner

    File "/usr/local/lib/python3.8/", line 870, in run

    self._target(*self._args, **self._kwargs)

    File "/usr/local/lib/python3.8/site-packages/sh-1.14.1-py3.8.egg/", line 1637, in wrap

    fn(*rgs, **kwargs)

    File "/usr/local/lib/python3.8/site-packages/sh-1.14.1-py3.8.egg/", line 2561, in background_thread


    File "/usr/local/lib/python3.8/site-packages/sh-1.14.1-py3.8.egg/", line 2265, in fn

    return self.command.handle_command_exit_code(exit_code)

    File "/usr/local/lib/python3.8/site-packages/sh-1.14.1-py3.8.egg/", line 865, in handle_command_exit_code

    raise exc


    RAN: /usr/bin/bash -c 'venv/bin/pip install Cython'


    Ignoring "sys._home = value" override

    WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

    Collecting Cython

    WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/cython/

  8. I never comment on anything but this helped me a ton (especially after trying to figure it out for over a week about 10 hours a day). If you are using a python module that requires you to utilize the internet (like say, paho-mqtt), make sure you change the permissions in your buildozer spec file (i think it's line 91) and allow the permissions for INTERNET. (i.e. delete the #). Before then my app would display the splash page and then crash. Literally, no video or article or stack overflow says to do this, hopefully this helps someone to not spend over 80 hours figuring it out 😉

  9. I have an error. The apk installs the app, but it takes me off the phone. I am using sqlite3. runs fine on pc. when the application starts it creates files and database. help!!!

  10. Thanks very much for this bro. Had a miserable first few attempts at this trying it direct from Mac OS. Had no idea how well VirtualBox actually worked. No more dual boot!

  11. This was pretty helpful but when I am in the virtual box and I try to create my thing (in your case, you called it android tutorial take 2), it gives me an error. This is what it says:

    Not in a hypervisor partition (HVP=0) (VERR_NEM_NOT_AVAILABLE).

    VT-x is disabled in the BIOS for all CPU modes (VERR_VMX_MSR_ALL_VMX_DISABLED).

    Result Code:

    E_FAIL (0x80004005)




    IConsole {872da645-4a9b-1727-bee2-5585105b9eed}

    Am I doing something wrong?

  12. Hi Erik, i'm trying to connect to my cloud firestore database with python3 and Kivy. It works perfectly when I just execute the from the terminal but when i try to deploy it to the phone with buildozer i get the error "No module named 'google.type" I have tried for days with different requirements in the buildozer.spec file but no worko.. Do you have a clue? This is my requirements string

    "requirements = python3,kivy==2.0.0rc3,kivymd,sdl2_ttf==2.0.15,android,plyer,gspread,oauth2client,httplib2,pyopenssl,google-auth-oauthlib,pyasn1,pyasn1-modules,rsa,requests,google-auth-httplib2,openssl,google-api-python-client,google-auth,credentials,oauth2,cachetools,urllib3,chardet,idna,requests_oauthlib,oauthlib,gcloud,firebase_admin,pyrebase,Pyrebase4,google-cloud,firebase-client,google-cloud-storage,requests-toolbelt,cryptography,pycryptodome,python-jwt,jwcrypto,httplib2,pyasn1,pyasn1-modules,rsa,certifi,Pillow,google-cloud-firestore,protobuf"

  13. I tried to follow some changes happened since March Ubuntu 18.04 used is now release 20.10. Seen to work fine until the "Sudo apt-get install cython" fails Package Cython has no installation candiate.

Leave a Reply

Your email address will not be published. Required fields are marked *