I forward here the bug report that was closed as github issues: (because it was said to be a support request).
Markus
Dear Developers,
**Software Versions**
* Python: 3.10
* OS: ubuntu 22.04
* Kivy: 2.1.0
* Kivy installation method: pip
**Describe the bug**
App runs fine on ubuntu 22.04 with` python main.py`
but when deploying to my android mobile phone with` buildozer android debug deploy run`
1) app starts with kivy logo
2) app crashes and goes background after couple of seconds
`adb logcat` gives
```
11-27 20:48:51.022 14315 14337 I python : File "kivy/graphics/instructions.pyx", line 1, in init kivy.graphics.instructions
11-27 20:48:51.023 14315 14337 I python : File "kivy/_event.pyx", line 1, in init kivy._event
11-27 20:48:51.024 14315 14337 I python : File "kivy/properties.pyx", line 279, in init kivy.properties
11-27 20:48:51.026 14315 14337 I python : ImportError: cannot import name Clock
11-27 20:48:51.026 14315 14337 I python : Python for android ended.
```
Code (main.py)
```
from kivy.base import runTouchApp
from kivy_garden.mapview import MapMarker, MapView, MapSource
from
kivymd.app import MDApp
map = MapView(zoom=10, lon=25, lat=60.5)
source = MapSource(url="
https://tiles.kartat.kapsi.fi/peruskartta/{z}/{x}/{y}.png",
cache_key="kapsi", tile_size=512,
image_ext="png", attribution="@ MML")
map.map_source = source
runTouchApp(map)
```
buildozer.spec, non-commented lines (tried various requirements, with no effect, tried also python-for-android, but that was even more horrible a mess)
```
[app]
# (str) Title of your application
title = My Teat Mok
# (str) Package name
package.name = ymppays# (str) Path to build artifact storage, absolute or relative to spec file
# build_dir = ./.buildozer
# (str) Path to build output (i.e. .apk, .aab, .ipa) storage
# bin_dir = ./bin
# -----------------------------------------------------------------------------
# List as sections
#
# You can define all the "list" as [section:key].
# Each line will be considered as a option to the list.
# Let's take [app] / source.exclude_patterns.
# Instead of doing:
#
#[app]
#source.exclude_patterns = license,data/audio/*.wav,data/images/original/*
#
# This can be translated into:
#
#[app:source.exclude_patterns]
#license
#data/audio/*.wav
#data/images/original/*
#
# -----------------------------------------------------------------------------
# Profiles
#
# You can extend section / key with a profile
# For example, you want to deploy a demo version of your application without
# HD content. You could first change the title to add "(demo)" in the name
# and extend the excluded directories to remove the HD content.
#
#[app@demo]
#title = My Application (demo)
#
#[app:source.exclude_patterns@demo]
#images/hd/*
#
# Then, invoke the command line with the "demo" profile:
#
#buildozer --profile demo android debug
# (str) Package domain (needed for android/ios packaging)
package.domain = org.test
# (str) Source code where the main.py live
source.dir = .
# (list) Source files to include (let empty to include all the files)
source.include_exts = py,png,jpg,kv,atlas
# (str) Application versioning (method 1)
version = 0.1
# (list) Application requirements
# comma separated e.g. requirements = sqlite3,kivy
requirements = python3,kivy,kivymd,kivy.clock,docutils,Kivy-Garden,requests,certifi,charset-normalizer,idna,urllib3,pygments,pillow,kivy-garden.mapview,mapview,appdirs,certifi,charset-normalizer,colorama,Cython,distlib,docutils,filelock,idna,Pillow,pyproj,requests,urllib3,sh,toml,zipp
# change the major version of python used by the app
osx.python_version = 3
# Kivy version to use
osx.kivy_version = 2.1.0
# (bool) Indicate if the application should be fullscreen or not
fullscreen = 0
# (list) Permissions
android.permissions = INTERNET, READ_EXTERNAL_STORAGE
# (int) Target Android API, should be as high as possible.
android.api = 33
# (int) Minimum API your APK / AAB will support.
android.minapi = 21
[buildozer]
# (int) Log level (0 = error only, 1 = info, 2 = debug (with command output))
log_level = 2
# (int) Display warning if buildozer is run as root (0 = False, 1 = True)
warn_on_root = 1
```
Terveisin, Markus