0

Lately, I'm trying to create my own app using Python KivyMD (with PyCharm). I also use packages like firebase and datetime. Now, I'm trying to convert my Kivy into APK but I don't know how to do it.

Packages list:

Kivy 2.1.0 2.1.0 Kivy-Garden 0.1.5 0.1.5 Pillow 9.2.0 9.2.0 Pygments 2.12.0 2.12.0 certifi 2022.6.15 2022.6.15 charset-normalizer 2.1.0 2.1.0 docutils 0.19 0.19 firebase 3.0.1 3.0.1 idna 3.3 3.3 kivmob 2.0 2.0 kivy-deps.angle 0.3.2 0.3.2 kivy-deps.glew 0.3.1 0.3.1 kivy-deps.sdl2 0.4.5 0.4.5 kivymd 0.104.2 0.104.2 pip 21.3.1 22.1.2 pypiwin32 223 223 pywin32 304 304 requests 2.28.1 2.28.1 setuptools 60.2.0 63.2.0 urllib3 1.26.10 1.26.10 wheel 0.37.1 0.37.1

Imported packages on main.py:

from kivymd.app import MDApp

from kivymd.uix.textfield import MDTextField
from kivymd.uix.dialog import MDDialog
from kivymd.uix.button import MDFlatButton, MDRectangleFlatButton
from kivymd.uix.list import MDList, OneLineListItem, TwoLineListItem, ThreeLineListItem
from kivymd.uix.boxlayout import MDBoxLayout

from kivy.lang.builder import Builder
from kivy.uix.screenmanager import Screen, ScreenManager

import requests
import json
import datetime

So I'm trying to convert it using Google Colab with Buildozer. I tried to follow some tutorials on YouTube, the converting works. However, the APK file won't open in my android phone.

I don't have separated files to be converted into an app, only main.py (+2 images for the app icon)

What should I do? I need clear instructions, especially when editing the buildozer.spec file.

Nick MC
  • 1
  • 3

1 Answers1

0

If you are using pictures make sure to put pillow in requirements (should be at around line 35 in the buildozer.spec file).

requirements = kivy, pillow #and every other library you use aswell, in your case firebase etc.

If your App requires any special permissions like Internet you need to also give permission dor that (found at around line 55)

android.permissions = INTERNET

Make sure to delete the # in the front

It's hard to tell whats the issue since you didn't provide much information, but if this didn't help, let me know more information about the issue.

You can also test your code without converting it to an apk with Pydroid3, and see if you run into any issues, as some libraries don't support Andorid.

DXNI
  • 149
  • 14