Hi,
The following kivy program crashes on my android device when the thread exists. Am I doing something wrong? May I use Pyjnius in threads?
PyJNIus version is 1.1-dev. I've attached the relevant part of output of adb logcat.
from kivy.uix.button import Button
from kivy.app import App
from kivy.logger import Logger
import threading
import jnius
from jnius import autoclass
def threadFunc():
System = autoclass('java.lang.System')
System.out.println('Hello World')
Logger.info('running thread')
if __name__ == '__main__':
class KivyApp(App):
def on_start(self):
print "PyJNIus version: " + jnius.__version__
self.t = threading.Thread(target=threadFunc)
self.t.start()
def build(self):
return Button(text='Hello World')
KivyApp().run()
Best Regards,
Dewald