Kivy Launcher Issue and Debugging Kivy App on Android

303 views
Skip to first unread message

Scott Barnard

unread,
May 16, 2021, 4:11:09 PM5/16/21
to kivy-...@googlegroups.com
Hello,

I am having trouble debugging an app that runs fine on my Windows machine but crashes immediately when trying to run an apk built on Google Colab using buildozer. I have a Samsung Galaxy S20 FE 5G phone. Other small example apps run just fine with the .apk generated.

When I had used Kivy previously (several times over the past 5 years), the Kivy Launcher worked just fine. But now it can never find the apps on my sdcard, thus, I can't run anything on the device to debug it. I have tried putting the files a number of different places as researched online but nothing seems to work. sdcard/kivy/<app name>/main.py etc and  sdcard/0/kivy/<app name>/main.py etc

Are there any other ways to debug the app within Android Studio using the .apk? I get a bunch of library debug symbols missing when I try to do that. Or maybe monitor my USB-connected device using Android Studio or some other application so I can see what is happening when the app launches?

Any help would be appreciated. Thanks!

Scott

Robert

unread,
May 16, 2021, 6:04:55 PM5/16/21
to Kivy users support
I build on a virtual machine and use adb from the desktop command line.

Search in the log for 'Traceback', a Python stack trace follows.

Scott Barnard

unread,
May 17, 2021, 8:38:46 PM5/17/21
to Kivy users support
Thank you, Robert. That definitely helped. I was able to connect both to my phone and to an emulator (far less busy logs with the emulator). I noticed that the default kivy version was wrong but that did not fix the issue. I will keep looking as I see urllib3 is missing.

What I am doing is pretty simple. Just trying to use UrlRequest to get data from and API and then load an image from a URL that is in the API response afterward with AsyncImage. Either way, thanks!

Scott Barnard

unread,
May 17, 2021, 9:03:08 PM5/17/21
to Kivy users support
I got it to work by being able to see the logs and that some packages were missing. Here is what ended up making it work:
requirements = python3==3.8.0,kivy==2.0.0,requests,urllib3,certifi,openssl,chardet,hostpython3==3.8.0,idna

Thanks again!

Reply all
Reply to author
Forward
0 new messages