When I use buildozer to generate an apk of the following script, the apk will generate and install on an Android device, but crashes when I try to run it. If I comment out importing pexpect and multiprocessing, the apk will run just fine. I have tried:
1) Copying the libraries to the project drive
2) Copying the libraries to .buildozer/applibs
3) Calling them as application requirements in buildozer.spec (which just the apk build to fail)
4) Even tried adding python as an application requirement in buildozer.spec
I must be missing something simple. I thought the python libraries were included in buildozer, but even trying to add them does not seem to be working. Any thoughts?
Also, I know this simple code does not require these functions. I am trying to troubleshoot a larger one that does need these functions.
import os
import time
import multiprocessing as mp #apk runs on device if these 2 are commented out
import pexpect #apk runs on device if these 2 are commented out
import datetime
from sensor_calcs_2650 import *
from kivy.app import App
from kivy.uix.button import Button
from kivy.uix.label import Label
from kivy.uix.boxlayout import BoxLayout
class st_gui(App):
def build(self):
g_master = BoxLayout(orientation='vertical')
g_block1 = BoxLayout()
g_block2 = BoxLayout(orientation='horizontal')
b1_mainlabel = Label(text='Device 1')
b1b1 = Button(text='Connect')
b1b2 = Button(text='Start')
b1b3 = Button(text='Pause')
b1b4 = Button(text='Stop')
g_block1.add_widget(b1_mainlabel)
g_block2.add_widget(b1b1)
g_block2.add_widget(b1b2)
g_block2.add_widget(b1b3)
g_block2.add_widget(b1b4)
g_master.add_widget(g_block1)
g_master.add_widget(g_block2)
return g_master
if __name__ == '__main__':
st_gui().run()