APK generated with buildozer (Ubuntu Virtual Box) using kivymd widgets not showing on phone, but it does work by replacing kivymd widgets by the default ones from kivy.

80 views
Skip to first unread message

Mateo Aita

unread,
Apr 7, 2020, 10:47:06 AM4/7/20
to Kivy users support
At buildozer.spec (requirements) i specify kivy 1.11.1
When starting up at my phone, adb logcat says that it wasn't posible to import kivymd.dialog or any other widget that it has. I also added something about the Recipe.
As i said before, the app actually works when using default widgets from kivy, it is definitely a kivymd issue and i would really appreciate if someone could help me, i couldn't find the solution anywhere in the web. Thank you very much for your time.

Robert Flatt

unread,
Apr 7, 2020, 1:44:08 PM4/7/20
to Kivy users support
It would help if you posted the the traceback part of the adb log, it is not exactly clear what the issue is, except it is about KivyMD

I have used KivyMD on Android and it worked , only added kivymd in the requirements  (I used p4a directly but that should not make a difference).
But KivyMD is a fast moving target, the KivyMD version can be important.
Perhaps the Android KivyMD version is different to the desktop KivyMD version?
If you need the master version of KivyMD, use this in the requirements in place of kivymd       git+https://github.com/HeaTTheatR/KivyMD.git

Mateo Aita

unread,
Apr 7, 2020, 2:04:43 PM4/7/20
to Kivy users support
04-07 15:00:23.555 10460 10490 I python  : Android kivy bootstrap done. _name_ is _main_
04-07 15:00:23.555 10460 10490 I python  : AND: Ran string
04-07 15:00:23.555 10460 10490 I python  : Run user program, change dir and execute entrypoint
04-07 15:00:23.753 10460 10490 I python  : [WARNING] [Config      ] Older configuration version detected (0 instead of 21)
04-07 15:00:23.754 10460 10490 I python  : [WARNING] [Config      ] Upgrading configuration in progress.
04-07 15:00:23.766 10460 10490 I python  : [INFO   ] [Logger      ] Record log in /data/user/0/org.test.myapp/files/app/.kivy/logs/kivy_20-04-07_0.txt
04-07 15:00:23.767 10460 10490 I python  : [INFO   ] [Kivy        ] v1.11.1
04-07 15:00:23.767 10460 10490 I python  : [INFO   ] [Kivy        ] Installed at "/data/user/0/org.test.myapp/files/app/python_bundle/site-packages/kivy/init_.pyc"
04-07 15:00:23.767 10460 10490 I python  : [INFO   ] [Python      ] v3.8.1 (default, Apr  7 2020, 03:06:31) 
04-07 15:00:23.767 10460 10490 I python  : [Clang 8.0.2 (https://android.googlesource.com/toolchain/clang 40173bab62ec7462
04-07 15:00:23.767 10460 10490 I python  : [INFO   ] [Python      ] Interpreter at ""
04-07 15:00:24.067  2030  2217 D WifiStateMachine:  ConnectedState !CMD_RSSI_POLL rt=10902909/14943650 84 0 "Fibertel WiFi263 5.8GHz" 3c:b7:4b:5a:a7:68 rssi=-18 f=5745 sc=60 link=150 tx=2.2, 0.0, 0.0  rx=2.3 bcn=76346 [on:0 tx:0 rx:0 period:3002] from screen [on:169163 period:665860] score=60
04-07 15:00:24.067  2030  2217 D WifiStateMachine:  L2ConnectedState !CMD_RSSI_POLL rt=10902910/14943650 84 0 "Fibertel WiFi263 5.8GHz" 3c:b7:4b:5a:a7:68 rssi=-18 f=5745 sc=60 link=150 tx=2.2, 0.0, 0.0  rx=2.3 bcn=76346 [on:0 tx:0 rx:0 period:0] from screen [on:169163 period:665860] score=60
04-07 15:00:24.067  2030  2217 D WifiStateMachine:  get link layer stats 3
04-07 15:00:24.127  2030  2217 D WifiStateMachine: fetchRssiLinkSpeedAndFrequencyNative rssi=-18 linkspeed=150 freq=5745
04-07 15:00:24.128  2030  2217 V WifiConfigManager: Updating scan detail cache freq=5745 BSSID=3c:b7:4b:5a:a7:68 RSSI=-18 for "Fibertel WiFi263 5.8GHz"WPA_PSK
04-07 15:00:24.130  2433  2532 I QCNEJ   : |CORE| CNE received action RSSI/Link Changed events: android.net.wifi.RSSI_CHANGED
04-07 15:00:24.130  2433  2532 D QCNEJ   : |CORE| Updating RSSI: -18
04-07 15:00:24.985 10460 10490 I python  : [INFO   ] [Factory     ] 184 symbols loaded
04-07 15:00:25.588 10460 10490 I python  : [INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
04-07 15:00:25.648 10460 10490 I python  : [INFO   ] [Text        ] Provider: sdl2
04-07 15:00:25.738 10460 10490 I python  : [INFO   ] [Window      ] Provider: sdl2
04-07 15:00:25.769 10460 10490 E libEGL  : validate_display:92 error 3008 (EGL_BAD_DISPLAY)
04-07 15:00:25.770 10460 10490 V SDL     : setOrientation() orientation=-1 width=800 height=600 resizable=true hint=
04-07 15:00:25.784 10460 10490 I python  : [INFO   ] [GL          ] Using the "OpenGL ES 2" graphics system
04-07 15:00:25.787 10460 10490 I python  : [INFO   ] [GL          ] Backend used <sdl2>
04-07 15:00:25.788 10460 10490 I python  : [INFO   ] [GL          ] OpenGL version <b'OpenGL ES 3.2 V@269.0 (GIT@908a5ce, I77d3059488) (Date:06/07/18)'>
04-07 15:00:25.788 10460 10490 I python  : [INFO   ] [GL          ] OpenGL vendor <b'Qualcomm'>
04-07 15:00:25.788 10460 10490 I python  : [INFO   ] [GL          ] OpenGL renderer <b'Adreno (TM) 506'>
04-07 15:00:25.788 10460 10490 I python  : [INFO   ] [GL          ] OpenGL parsed version: 3, 2
04-07 15:00:25.789 10460 10490 I python  : [INFO   ] [GL          ] Texture max size <16384>
04-07 15:00:25.789 10460 10490 I python  : [INFO   ] [GL          ] Texture max units <16>
04-07 15:00:25.798   874   950 E ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
04-07 15:00:25.836 10460 10490 I python  : [INFO   ] [Window      ] auto add sdl2 input provider
04-07 15:00:25.838 10460 10490 I python  : [INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
04-07 15:00:25.843 10460 10490 I python  : [INFO   ] [KivyMD      ] KivyMD version: 0.1.2
04-07 15:00:25.988 10460 10490 I python  :  Traceback (most recent call last):
04-07 15:00:25.988 10460 10490 I python  :    File "/home/camilo/Desktop/KivyAPP/.buildozer/android/app/main.py", line 27, in <module>
04-07 15:00:25.989 10460 10490 I python  :    File "/home/camilo/Desktop/KivyAPP/.buildozer/android/app/kivymd/theming.py", line 17, in <module>
04-07 15:00:25.990 10460 10490 I python  :    File "/home/camilo/Desktop/KivyAPP/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/myapp/kivy/core/text/_init_.py", line 315, in register
04-07 15:00:25.990 10460 10490 I python  :  OSError: File ./kivymd/fonts/Roboto-Regular.ttf not found
04-07 15:00:25.990 10460 10490 I python  : Python for android ended.

Mateo Aita

unread,
Apr 7, 2020, 2:17:36 PM4/7/20
to Kivy users support


source.include_exts = py,png,jpg,kv,atlas,mp3
After # that comment, the apk worked in my phone, thank you very much.

Robert Flatt

unread,
Apr 7, 2020, 5:34:14 PM4/7/20
to Kivy users support
Good solution,  adding ttf to this list might also work
Interesting, I didn't have to do this so to appears p4a and Buildozer are different in this respect.
Reply all
Reply to author
Forward
0 new messages