Convert Python App to APK | Kivy App crashing & Blank Screen Solved | Kivy Python Buildozer Tutorial

preview_player
Показать описание
In this kivy python to apk tutorial, you will learn how to convert kivy python app into an android apk using buildozer. If your app crashes or you see a blank screen after the pre-splash screen, you will get your answers in this kivy tutorial. Using google colab, you will learn how to successfully convert a Python Kivy App into an Android apk.

###################################################
NOTE:
Apart from these two problems, there are still some problems related to conversion and we are working hard to solve them. In order to keep yourself up-to-date, please SUBSCRIBE to the channel.
##################################################

COLAB INSTRUCTIONS:

1. !pip install buildozer

2. !pip install cython==0.29.19

3. !sudo apt-get install -y \
python3-pip \
build-essential \
git \
python3 \
python3-dev \
ffmpeg \
libsdl2-dev \
libsdl2-image-dev \
libsdl2-mixer-dev \
libsdl2-ttf-dev \
libportmidi-dev \
libswscale-dev \
libavformat-dev \
libavcodec-dev \
zlib1g-dev

4. !sudo apt-get install -y \
libgstreamer1.0 \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good

5. !sudo apt-get install libffi-dev

6. !sudo apt-get install build-essential libsqlite3-dev sqlite3 bzip2 libbz2-dev zlib1g-dev libssl-dev openssl libgdbm-dev libgdbm-compat-dev liblzma-dev libreadline-dev libncursesw5-dev libffi-dev uuid-dev libffi6

7. !apt-get update (if necessary)

8. !buildozer init

9. !buildozer -v android debug
Рекомендации по теме
Комментарии
Автор

Thank you very much for this. I've been following your tutorials for a long time and it has been awesome.

okunlolafz
Автор

Hey, my kivymd app which is face recognition app and uses mysql database crushes after presplash. I really apreciate if u can help me.

GetacherA
Автор

is Google Colab faster thn using WSL to build the android app?

dickiie
Автор

When i open my app on android it wont load. It just crashes after a second of loading

requirements = python3, kivy==2.0.0rc3, kivymd==0.104, pillow==8.4.0 // i tried using different versions and still would not work

also my python file uses only kivy because i wanted to see if it loads (it didnt)

wolp
Автор

Hi, my kivy apk just showed a loading screen and fails. I have only installed kivy, kivymd and a mysql connector in a virtual environment. this shows me when i use pip list
certificate 2022.12.7
charset normalizer 3.0.1
docutils 0.19
idna 3.4
Kivy 2.2.0.dev0
kivy-deps.angle 0.3.3
kivy-deps.glew 0.3.1
kivy-deps.gstreamer 0.3.3
kivy-deps.sdl2 0.5.1
Kivy-examples 2.2.0.dev0
Kivy-Garden 0.1.5
kivymd 1.1.1
mysql-connector-python 8.0.32
Pillow 9.4.0
pip 22.3.1
protobuf 3.20.3
Pigments 2.14.0
pypiwin32 223
pywin32 305
requests 2.28.2
setuptools 66.0.0
urllib3 1.26.14
wheel 0.38.4
could you help me?

ezequielalbano
Автор

5:00 I use only python3 and kivy. Do I need to add pillow and kivymd?

TomMedia
Автор

My application crashes everytime I make apk file. I used kivy, kivymd, and sql in my code. I put
requirement = python3, kivy == 2.1.0, kivymd == 1.1.1, pillow, mysql_connector. I also trid my simple code which only consists only kivy and kivymd even also that crashes. Please help me

kushpatel_
Автор

My problem is that the app opened and showing kivy loading screen. Then showing a black screen for a second then the app force close.

mwm
Автор

Thanks that was the best tip I received. Using pip show gave all the dependencies and my apk finally works on the phone.

squeakykleen
Автор

Bro my kivy apk crashes suddenly after the launch.

So will you please show me the changes in the spec file ??, i will provide you the spec file.

helloeveryone
Автор

Hello thank you! the black screen still appeared. You doubt: any recommendations for files that will be compiled together (exel worksheet, photos, ) all have to be used with lowercase letters?

MatheusGuitarRock
Автор

Hello great course, I m facing one issue: I don't know what kivvy version to write in colabse:

# (list) Application requirements
# comma separated e.g. requirements = sqlite3, kivy
requirements =

Meditation
Автор

Hi, my program included the module "random" so I included it into the requirements, then when I tried to debug my app then an error "Could not find a version that satisfies the requirement random (from versions: none)" occurred. After I removed "random", I managed to debug my app but the app crashes. Do you have any idea about this issue?

nickkz
Автор

thank you very much ♥♥♥ I've been trying for two days to find out the problem

lovekivy-rudseqs
Автор

Ok all good and well. How do I upload a project that has multiple folders and files including csv files?

jonathanlloyd
Автор

Hello, I get this error message in the last command:

STDOUT:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named '_version'

zaclownoverheavenalternati
Автор

Hi, could you help me to convert my kivy app, it doesn't open my app on my phone, I've tried everything in builderdozer and nothing.

jhosuaromero
Автор

Hi, My kivy apk just showed a loading screen and it crashes. I used the googletrans module in my app, is it compatible with android?

X_YTChannel
Автор

Does this process work also without a .kv file? I mean using the Builder.load_string approach instead of the Builder.load_file?

protopilote
Автор

That works !
just a remark: line 1 buildozer and not bulldozer :)
and a little question: how do you know the list of all the libraries to install and does the order matter ?
Thanks !

michelpetit