kivy android apps close immediately

1,138 views
Skip to first unread message

Debbie Rich

unread,
Feb 20, 2015, 4:55:00 PM2/20/15
to kivy-...@googlegroups.com
Running kivy on OSX 10.8.5

I successfully compiled both the first example from kivycrashcourse ('hello!') and /examples/android/compass.
Both installed OK on my LG VK810 4G tablet running android 4.4.2

When I try to run either one, the app starts, very briefly flashes 'Loading' and then quits.

Any suggestions?

Thanks.

Debbie Rich

unread,
Feb 20, 2015, 10:53:38 PM2/20/15
to kivy-...@googlegroups.com
The debug output has this warning in it:

build.xml: Failed to find version-tag string. File must be updated.
In order to not erase potential customizations, the file will not be automatically regenerated.
If no changes have been made to the file, delete it manually and run the command again.
If you have made customizations to the build process, the file must be manually updated.
It is recommended to:
    * Copy current file to a safe location.
    * Delete original file.
    * Run command again to generate a new file.
    * Port customizations to the new file, by looking at the new rules file
      located at <SDK>/tools/ant/build.xml
    * Update file to contain
          version-tag: custom
      to prevent file from being rewritten automatically by the SDK tools.

But isn't this warning related to the way version is set in the .spec file?
Here's the section from that:

# (str) Application versioning (method 1)
#version.regex = __version__ = ['"](.*)['"]
#version.filename = %(source.dir)s/main.py

# (str) Application versioning (method 2)
version = 1.0.0

This looks just like it did in the kivycrashcourse lesson 2.
???

Ben Rousch

unread,
Feb 21, 2015, 6:50:56 AM2/21/15
to kivy-...@googlegroups.com
If you have an installable APK, it probably built fi e. We'll need the logs from running on the device To help you.

Debbie Rich

unread,
Feb 21, 2015, 4:06:31 PM2/21/15
to kivy-...@googlegroups.com
OK here is a portion of the logcat.
This was generated by . . . $buildozer -v android debug deploy run logcat


On Friday, February 20, 2015 at 3:55:00 PM UTC-6, Debbie Rich wrote:
logcat_dump.rtf

Debbie Rich

unread,
Feb 23, 2015, 11:41:10 AM2/23/15
to kivy-...@googlegroups.com
This appears to be the pertinent section:

Note message about 'no module named kivy.app'

I/python  (11625): Initialize Python for Android
I/python  (11625): ['/data/data/org.test.firstapp/files/lib/python2.7/site-packages', '/data/data/org.test.firstapp/files/lib/site-python']
I/python  (11625): Android path ['/data/data/org.test.firstapp/files/lib/python27.zip', '/data/data/org.test.firstapp/files/lib/python2.7', '/data/data/org.test.firstapp/files/lib/python2.7/lib-dynload', '/data/data/org.test.firstapp/files/lib/python2.7/site-packages', '/data/data/org.test.firstapp/files', '/data/data/org.test.firstapp/files/_applibs']
I/python  (11625): Android kivy bootstrap done. __name__ is __main__
I/python  (11625): Run user program, change dir and execute main.py
I/python  (11625): Traceback (most recent call last):
I/python  (11625):   File "/Users/home/Kivy_projects/first_app/.buildozer/android/app/main.py", line 1, in <module>
I/python  (11625): ImportError: No module named kivy.app
I/python  (11625): Python for android ended.
I/AndroidRuntime(11625): VM exiting with result code 0, cleanup skipped.
I/ActivityManager(  867): Process org.test.firstapp:python (pid 11625) has died.


On Friday, February 20, 2015 at 3:55:00 PM UTC-6, Debbie Rich wrote:

Andreas Heckwolf

unread,
Mar 5, 2015, 10:06:26 AM3/5/15
to kivy-...@googlegroups.com
Hello Debbie,

do you have kivy in the requirements listed in buildozer.spec?

requirements = plyer,futures,requests,pyopenssl,kivy

Cheers,
Andreas

Ed_S

unread,
Mar 5, 2015, 11:49:31 AM3/5/15
to kivy-...@googlegroups.com

Did you import kivy? i.e 
 import kivy
kivy.require('1.9.0')
from kivy.app import App

I also found out through trial and errors that empty module imports can cause an app to behave like that. Make sure all imports are being used and remove any that are not being used.
Regards.
Reply all
Reply to author
Forward
0 new messages