Тёмный

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

Full Stack Lab
Подписаться 2,6 тыс.
Просмотров 57 тыс.
50% 1

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:
github.com/denczo/kivy_examples
ADB for Windows:
dl.google.com/android/reposit...
▬ Commands ► ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
► Download project
git clone github.com/denczo/kivy_examples
► Install buildozer:
git clone github.com/kivy/buildozer.git
cd buildozer
sudo python3 setup.py install
► 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
adb -s DEVICE_ID install name.apk
► 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
► 4:44 - Buildozer Configuration (Buildozer.spec)
► 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
► t.bone SC400
► Cheap Webcam

Опубликовано:

 

30 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 84   
@fullstacklab
@fullstacklab 2 года назад
Hey folks :) You can find the most important commands in the description. I also want to mention this tutorial works perfectly fine for Ubuntu.
@gideonocholi130
@gideonocholi130 Год назад
I have this error: C compiler cannot create executables
@spozniony5499
@spozniony5499 Год назад
And i have some simple problem my app crush on start and thoesent put ligcat
@polalonso4808
@polalonso4808 5 месяцев назад
Upgrade WSL from WSL1 to WSL2
@agnichatian
@agnichatian Год назад
Didn't watch yet but wanted to say, just love your description section.
@Samssh-t
@Samssh-t 2 года назад
This Video is really helpful. respect man!!!
@joefish2177
@joefish2177 10 месяцев назад
@ 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?
@andadong4520
@andadong4520 3 месяца назад
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
@Schnieker
@Schnieker Год назад
Super Tutorial :)
@panchajanya91
@panchajanya91 9 месяцев назад
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.
@polalonso4808
@polalonso4808 5 месяцев назад
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
@trillionairetrader798
@trillionairetrader798 Год назад
Your tutorial really helped me compile my app. Thank you very much
@fullstacklab
@fullstacklab Год назад
I'm glad I could help :)
@skroyeducation2166
@skroyeducation2166 11 месяцев назад
Hey bro can you help me to deploy my program because I am facing errors again and agai
@skroyeducation2166
@skroyeducation2166 11 месяцев назад
Please reply if you can do so
@zerobudget1041
@zerobudget1041 2 года назад
thanks for making a video like this
@bappe95
@bappe95 2 года назад
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?
@Tecknoc
@Tecknoc 3 месяца назад
Vielen Dank!!! Du bist ein life saver
@jitheshkuyyalil
@jitheshkuyyalil 6 месяцев назад
Wonderful! Thank you so much!
@fullstacklab
@fullstacklab 6 месяцев назад
You're welcome :)
@2pacOk4
@2pacOk4 Год назад
Hello, please i need your help, i am getting this error: fatal: could not set 'core.filemode' to 'false'
@squeakykleen2176
@squeakykleen2176 10 месяцев назад
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.
@hellocodeur
@hellocodeur 23 дня назад
thank you very much. u save my life
@hakimatakto667
@hakimatakto667 Год назад
buildozer requires api adnroid level 21 but my 16(i think) , somemone know smth abouy that?
@PhilsLab
@PhilsLab 2 года назад
Very nice
@kaii7075
@kaii7075 2 года назад
thanks so much for your help it means a lot
@fullstacklab
@fullstacklab 2 года назад
Glad i could help :) Hope this video takes the mystery around buildozer away
@claudiojlf
@claudiojlf 2 года назад
Es posible abrir este proyecto desde Android Studio ? . Muchas Gracias!
@akhilavissomraju1245
@akhilavissomraju1245 3 месяца назад
How can i deploy my app if I'm using windows? is it necessary to use linux
@jorgeossa71
@jorgeossa71 2 года назад
Thanks a lot.
@Fan_bamaYT
@Fan_bamaYT Год назад
Thank for Your nice tutorial
@fullstacklab
@fullstacklab Год назад
I'm glad I could help :)
@drapek99
@drapek99 6 месяцев назад
Thanks Bro 💪
@MikkelUnrau
@MikkelUnrau Год назад
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!
@fullstacklab
@fullstacklab Год назад
Hey Mikkel! I'm glad I could help. I was using the virtual machine before but I had a lot of issues with the connection to my phone. Also, the setup with the Ubuntu Subsystem nowadays is way easier and cleaner and it allows you to do all the development on windows. Transferring data from windows to the subsystem and back is no big deal. Cheers
@olafdevos4355
@olafdevos4355 2 года назад
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
@fullstacklab
@fullstacklab 2 года назад
You need to add the command "git clone" in front of the link, e.g. "git clone github.com/denczo/kivy_examples"
@smarttv3304
@smarttv3304 Год назад
@@fullstacklab Thanks, i had the same problem.
@HoRRoRlets
@HoRRoRlets 2 года назад
Hey Friend. So far, I have managed to follow your video the best online. But I do need help, I have the repositories cloned, and have the buildozer.spec file initialised. I am confused how you got to the point where you could modify the buildozer spec file...I seem to have no way to view the spec file...
@fullstacklab
@fullstacklab 2 года назад
Hey Harry! You just need to go to the location of the buildozer.spec file and open it with an editor like nano (for Linux) or vscode/pycharm (windows).
@mehmetfurkanyazici
@mehmetfurkanyazici Год назад
hey dude in windows have an other git...
@drbroering1990
@drbroering1990 2 года назад
Nice tutorial, but i have a problem. "OSError: Could not find the TLS certificate file, invalid path: certificate.pem.crt" how can i solve this problem ?
@reallynotarihant
@reallynotarihant 10 месяцев назад
mamaboy
@Hoptimus_Prime
@Hoptimus_Prime Год назад
Ok, certainly user error, but I put in the web address to download the example github files and I get a "no such file or directory" error. Which isn't the case because I can download it on my browser and such. I didn't have a typo in there either as it's copy pasted.
@fullstacklab
@fullstacklab Год назад
Hey Hoptimus_Prime! Did you add the "git clone" command in front of the link? "git clone github.com/denczo/kivy_examples"
@Hoptimus_Prime
@Hoptimus_Prime Год назад
I figured out that was the issue a couple of hours ago. I totally thought I commented saying I figured it out and what the problem was. I'm just a total noob when it comes to Linux and in the video it just looked like you were pasting the link directly into it. Thanks for the quick reply!
@JamalKhan-zl8lu
@JamalKhan-zl8lu Год назад
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.
@fullstacklab
@fullstacklab Год назад
Hey Jamal! Have you tried it using the windows command prompt? I haven't tested it with the PowerShell yet.
@JamalKhan-zl8lu
@JamalKhan-zl8lu Год назад
@@fullstacklab okay I'll try it on command prompt. Then I'll tell you my result. Thanks for reply
@JamalKhan-zl8lu
@JamalKhan-zl8lu Год назад
​@@fullstacklab I tried using the windows command prompt but still facing the same issue :(
@rozzi1936
@rozzi1936 7 месяцев назад
just use your ip @@JamalKhan-zl8lu
@adfinemrising
@adfinemrising Год назад
i always get an error when installing cython. i dont know why. it just gives me this error: E: Package 'cython' has no installation candidate
@fullstacklab
@fullstacklab Год назад
There is a post on stackoverflow with a solution to your problem: stackoverflow.com/questions/66973759/cython-not-found-please-install-it-error-in-buildozer
@Hoptimus_Prime
@Hoptimus_Prime Год назад
@@fullstacklab I had that same error and followed the stackoverflow solution and it allowed me to run buildozer it ran for 20 minutes or so and at the very end it gave me an error "could not find a version that satisfies the requirement Cython (from versions: none)"
@pmc56982
@pmc56982 6 месяцев назад
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.
@m.dharun4759
@m.dharun4759 11 месяцев назад
Im stuck for 2 days trying to finish my app and upload it. Hope it works
@ilhemkacimi4787
@ilhemkacimi4787 11 месяцев назад
is the .kv file necessary? if yes how to build it?
@fullstacklab
@fullstacklab 11 месяцев назад
The .kv file contains the structure and design of your kivy widgets. It's similar to a CSS file of a website. It has nothing to do with the build process. You can define all your kivy widgets in the main.py file but I do recommend to separate it from the python code. It makes your code easier to read and to maintain.
@shoxruxsunnatov
@shoxruxsunnatov 6 месяцев назад
I wish I could like this video twice.
@fullstacklab
@fullstacklab 6 месяцев назад
Thanks! Well, you can recommend it to someone else :)
@shoxruxsunnatov
@shoxruxsunnatov 5 месяцев назад
​@@fullstacklab Hello, thanks for your informative and useful video tutorial. But unfortunately I couldn't make a single APK file using buildozer. I'm not assuming that this tutorial is misleading though. I'm officially giving up and I'm gonna start learning Kotlin to make Android apps.
@fullstacklab
@fullstacklab 5 месяцев назад
@@shoxruxsunnatov No worries. Kotlin will be the better choice because you can create native android apps with it. Kivy is only for very basic apps and has a lot of limitations. It's advantage is that it's pretty easy to set up. May I ask, what's the issue? To create an apk successfully with buildozer, it's all about the buildozer .spec file.
@esraissam8042
@esraissam8042 2 года назад
I can not find setup.py in my buildozer directory
@alexandernetscher6487
@alexandernetscher6487 Год назад
Same here - any solution to this ?
@jimgelston
@jimgelston Год назад
How do I package a kivvy app for iOS?
@fullstacklab
@fullstacklab Год назад
I haven't tried it for iOS yet. I guess you need to adjust the buildozer file. There are some settings for iOS and then follow the documentation: kivy.org/doc/stable/guide/packaging-ios.html
@mertmehmetaraz3119
@mertmehmetaraz3119 Месяц назад
adb logcat | grep "python" Worked for me probably cuz of different version of adb.
@steamedtech
@steamedtech 2 месяца назад
linux aint installing
@eugenesheelyvideos8687
@eugenesheelyvideos8687 2 года назад
Had to put in sudo apt-get update to be able to install python in case anyone has issues.
@fullstacklab
@fullstacklab 2 года назад
good point
@potschochterpotschochter2403
@potschochterpotschochter2403 2 года назад
@@fullstacklab I'll try it. Because it did not find ipython, nor cython. Maybe this is why. I'll try this approach after work. Thank you.
@potschochterpotschochter2403
@potschochterpotschochter2403 2 года назад
@@fullstacklab well it cannot find ipython. Is ipython dead? Cython has been found
@potschochterpotschochter2403
@potschochterpotschochter2403 2 года назад
had to use this command and it was found: sudo pip3 install ipython
@socialcraftr
@socialcraftr Год назад
tu ensinou metade e a outra metade tu simplesmente cortou boa parte de como chegava as pastas e como usava o arquivo mds
@PIKL4x4
@PIKL4x4 Год назад
checking whether the C compiler works... no configure: error: in `/home/xxx/bin/buildozer/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/libffi/arm64-v8a__ndk_target_21/libffi': configure: error: C compiler cannot create executables anyone know why my C compiler is complaining? any help is appreciated, not much help online
@danielzuza
@danielzuza Год назад
I face the issue, i found no solution so far. Have you overcome that problem, if yes what was the solution?
@PIKL4x4
@PIKL4x4 Год назад
@@danielzuza I skipped all of this and went and used Google Colab for it. I didn't want to spend weeks searching for what dependencies were missing and then mess up my system. Google Colab is just as good, though once the session times out you have to compile everything all over again and that takes a few mins. I cant remember the YT channel that i found detail instructions on but they are out there. Good Luck!
@DubbyBoy12
@DubbyBoy12 Год назад
im facing this error too, anyone have other solutions?
@sebastiandalsgaard9539
@sebastiandalsgaard9539 Год назад
Hi! Very nice totorial!, I have this same issue, did anyone fix it? Thanks,
@isaacpolo8643
@isaacpolo8643 11 месяцев назад
Im gettin the same error, did you find the right solution? thanks@@DubbyBoy12
Далее
Документы для озокомления😂
00:24
кукинг с Даниилом 🥸
01:00
Просмотров 491 тыс.
Build Android Apps with Flet in Python (APKs)
8:59
Просмотров 33 тыс.
How to make APK from Flet using Serious Python
20:13
Просмотров 16 тыс.
Simple Android Calculator App in Python
21:06
Просмотров 40 тыс.
python Kivy a Android APK en Google Colab
20:58
Просмотров 2,3 тыс.
Документы для озокомления😂
00:24