Build & Deploy Kivy Python App (.apk) with Buildozer to Android (Windows & Linux)

preview_player
Показать описание
This tutorial demonstrates how to build and deploy an android app to your smartphone. The app was programmed with python and the kivy framework. Buildozer, the android debug bridge and the ubuntu subsystem were used to build, deploy and debug the android app. This tutorial works also perfectly fine for Ubuntu.

If anything is unclear, feel free to ask and write a comment.

▬ Links ► ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Code of this tutorial:
ADB for Windows:

▬ Commands ► ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

► Download project

► Install buildozer:
cd buildozer

► Required libraries and tools:
sudo apt-get update
sudo apt-get install openjdk-8-jdk
sudo apt-get install unzip
sudo apt install python3 python3-pip ipython3
sudo apt install cython
sudo apt-get install autoconf
sudo apt install build-essential libltdl-dev libffi-dev libssl-dev python-dev
sudo pip3 install --upgrade cython
sudo apt-get install zip

► Build & Deployment
buildozer android debug deploy run logcat
adb -s DEVICE_ID logcat *:S python:D

► Connection to phone
adb devices
cmd:
adb tcpip 5555
wsl2 (ubuntu subsystem):
adb connect YOUR_IP:5555

▬ Chapters ► ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

► 0:00 - Intro
► 0:27 - Install Ubuntu Subsystem
► 2:00 - Install Buildozer
► 10:44 - Build .apk with Buildozer
► 13:50 - Connect Android Phone to PC
► 18:25 - Deploy .apk to Android Phone
► 19:27 - Debug App on Android Phone via terminal
► 21:50 - Outro

▬ Programming ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

► Pycharm Community Edition
► Python 3.8.1
► Kivy 2.0

▬ Editing ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

► Sony Vegas Pro Edit 14
► OBS
► Cheap Webcam
Рекомендации по теме
Комментарии
Автор

Hey folks :) You can find the most important commands in the description. I also want to mention this tutorial works perfectly fine for Ubuntu.

fullstacklab
Автор

Didn't watch yet but wanted to say, just love your description section.

agnichatian
Автор

Nice tutorial! Just one little thing: in order to make this work, WSL needs to be upgraded from WSL1 to WSL2, otherwise you get 'C compiler cannot create executables' error

polalonso
Автор

I dont understrand anything, why is there suddenly a .sepc and buildozer folder in the github project, last time these two folders did not exist

andadong
Автор

Hi please help! Everything works well til command in Ubuntu: adb connect YOUR_IP:5555. the error message is: failed to connect to 'myIP:5555': Connection timed out. Even in cmd i got the same massage like your: restarting in TCP mode port: 5555. All your steps with setting phones I checked. Do you have for me some suggestion?

leosngo
Автор

@ 7:38, How would I reference a file in the "data" folder within my main.py file, in other words what file path should i give the python file so it will be able to find it when being run on the android phone?

joefish
Автор

Your tutorial really helped me compile my app. Thank you very much

trillionairetrader
Автор

I added numpy in requirement in buildozer.spec, but when I execute the command "buildozer android debug deploy run logcat", it is giving me an error that no module named Cython and running cythonize failed. If I remove numpy, then it is not giving the error. But I need numpy for my app. Can you help me? Thank You.

panchajanya
Автор

This Video is really helpful. respect man!!!

Samssh-t
Автор

when pasting the link to your program's github in the terminal I get the error - bash: no such files or directories. Is there any way how i can fix it

olafdevos
Автор

The apk is created but it is not running on the mobile.
I had to do a few more things to clear all the errors
1 error was the file not found on the url. I found out that if you are behind a proxy it can happen. So connected with a different network and it worked. I got kivy errors those were resolved by installing h5py separately.

squeakykleen
Автор

How can i deploy my app if I'm using windows? is it necessary to use linux

akhilavissomraju
Автор

This video helped a lot with getting my app up and running, especially the parts where you go back and debug. Thanks a bunch! Another similar (but less helpful) video I found used VirtualBox for their virtual Ubuntu environment, and they didn't have to mess around with adb. Is there a reason you didn't go that route? When I see two different ways to do something it leaves me wondering why choose one over the other. Thanks again!

MikkelUnrau
Автор

Hello, please i need your help, i am getting this error: fatal: could not set 'core.filemode' to 'false'

pacOk
Автор

sorry if this may stupid so should i install all these required libraries into the cloned buildozer folder

notmidhun
Автор

buildozer requires api adnroid level 21 but my 16(i think), somemone know smth abouy that?

hakimatakto
Автор

nice tutorial! works perfectly for me on test app but same steps on my own give following error: "Android SDK dir not specified exiting" do you know a solution to it?

bappe
Автор

checking whether the C compiler works... no
configure: error: in
configure: error: C compiler cannot create executables

anyone know why my C compiler is complaining? any help is appreciated, not much help online

PIKLx
Автор

that worked well ! too bad we can't use buildozer directly from cmd and that WSL can't access USB easily. Before watching this video I tried to hack around with WSL by redirecting adb to the cmd one with a symbolic link. It failed miserably but connected through tcpip did the job in the end.

pmc
Автор

Hey Denicz ... I am following your tutorials but the problem is that a device id of my phone is not showing in the Linux shell. Even I start the ADB server in windows PowerShell but it shows only my phone ' ip_address:5555' device in the Linux shell.

JamalKhan-zllu