Reputation: 3719
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?
Upvotes: 1
Views: 1734
Reputation: 3719
Of course, the buildozer spec should read
# (str) Source code where the main.py live
source.dir = .
Upvotes: 1
Reputation: 164
I'm posting another answer even though the first was accepted since I believe there could be others out there hitting this on google in need of a different solution.
I had the same issue running my kivy app. Turns out I had a syntax error in one of my modules which prevented compilation of main.py. buildozer did show an error for this, but with all the output using log_level=2 it was easy to miss. Check your code for syntax errors by running python and importing main.app.
Another issue could be the use of the multiprocessing module, which doesn't work on android.
Upvotes: 0