Coverting Python Kivy to Android Using Google Colab #Part 2 Updating Spec file

preview_player
Показать описание
Please see here my notebook information

## Google Drive link

## Step 1: Install some updates and packages vital for packaging

!sudo apt update
!sudo apt install -y git zip unzip openjdk-17-jdk python3-pip autoconf libtool pkg-config zlib1g-dev libncurses5-dev libncursesw5-dev libtinfo5 cmake libffi-dev libssl-dev
!pip3 install --user --upgrade Cython==0.29.33 virtualenv

## Step 2: Install buildozer

# Commented out IPython magic to ensure Python compatibility.
# git clone, for working on buildozer
%cd buildozer
!pip install -e .

## Step 3: Create folder and upload your files
%cd #Navigate into the folder e.g %cd MyApp

## Step 4: Create the spec file

!buildozer init

## Step 5: Run buildozer.
"""Make sure to accept the terms and conditions. The process could take up to 15 minutes so be patient.
"""

!buildozer -v android debug

#!buildozer android clean

Drop any Questions here?

My Facebook Page

Find codes Here

Twitter Page
Рекомендации по теме
Комментарии
Автор

It is such a relief to get clear, step-by-step instructions on how to package my python kivy app for deployment on Android. I was pleased when I got an apk file that I was able to transfer to my Android phone. Unfortunately, my app keeps crashing. It will show the default loading screen presplash with the kivy logo, then nothing. No error message or anything to give me a clue. I am unsure if it is because I did something wrong with customising the buildozer spec file, or something else.

The specs which I changed are the following:
title = Twenty Questions Tracker

package.name = twentyqt
source.include_exts = py, png, jpg, kv, ttf (added TTF because I use different fonts)
requirements = python3, kivy, pillow (added pillow like you suggested, although there are no images inside my app. I did not use any modules other than kivy)
icon.filename = Images/20qt_icon.png (Yes I did create the folder Images in my Google Colab)
osx.kivy_version = 2.3.1 (Updated from the default 2.2.0 because I am using kivy 2.3.1)
android.api = 34 (changed tp 34 like suggested though I doubt I will bother putting it on Google Play Store)

If you can't see any obvious mistakes I made here, I will see if there is something inside of the program itself I need to change.

I should also state that I am not generally a tech savvy person and only started learning Python and Kivy about two weeks ago. I may have to just admit I am in over my head, as usual.

jocelynburrows
Автор

Thanks man for this, i followed all the steps involved and it was able to package successfully, but it keeps on crashing after opening and it do not install on all android phones

paulMatthew-pd
Автор

Hello brada!
one question! where do you download the apk file? to your computer or mobile? if to the computer, how did u connect to the mobile. if you downloaded directly to your phone, how pls??

SilentCodePractice
Автор

Hi bro. My app keeps on crashing after installation. Even though i use supabase on my project and i involved it on my buildozer.spec file requirements it still crashes after installing i have tried different ways

imraanmuctar
Автор

hi bro it take more time and it not showing response properly

Banzero-mk
welcome to shbcf.ru