Search code examples
androidkivybuildozer

Kivy on Android not working


I'm testing my first app on Android written in Kivy

I've followed the tutorial here

I've copied the app to my android device, but when I run it, it just stops

I've used:

buildozer android logcat

and the relevant lines of output seem to be:

I/python  (32075): ['/data/data/org.test.bfgapp/files/lib/python2.7/site-packages', '/data/data/org.test.bfgapp/files/lib/site-python']

I/python  (32075): Android path ['/data/data/org.test.bfgapp/files/lib/python27.zip', '/data/data/org.test.bfgapp/files/lib/python2.7', '/data/data/org.test.bfgapp/files/lib/python2.7/lib-dynload', '/data/data/org.test.bfgapp/files/lib/python2.7/site-packages', '/data/data/org.test.bfgapp/files', '/data/data/org.test.bfgapp/files/_applibs']

I/python  (32075): Android kivy bootstrap done. __name__ is __main__
I/python  (32075): Run user program, change dir and execute main.py
I/python  (32075): No main.pyo / main.py found.

I/AndroidRuntime(32075): VM exiting with result code 0, cleanup skipped.
I/SurfaceFlinger( 1948): id=1057 Removed TurfaceView (2/5)
I/ActivityManager( 2426): Process org.test.bfgapp:python (pid 32075) (adj 0) has died.
W/ActivityManager( 2426): Force removing ActivityRecord{44d8df18 u0 org.test.bfgapp/org.renpy.android.PythonActivity}: app died, no saved state

I've Googled for: No main.pyo / main.py found

But all it says is my main.py is missing. This is not very helpful as I have called my (only) file main.py and that is referenced in buildozer.spec

# (str) Source code where the main.py live
source.dir = /home/jeff/Kivy/Label/main.py    

Can someone please give me a suggestion?


Solution

  • Of course, the buildozer spec should read

    # (str) Source code where the main.py live
    source.dir = .