I converted my files into an APK earlier on Google Colab, however the app just crashes when I try to open it. The Kivy splashscreen shows up then automatically crashes after that. I have included the necessary files and requirements in the buildozer.spec file and whenever I try to debug the application using ADB Logcat, it produces a lot of information and I don't know how to interpret it.
These are the files that I have included:
- Amellia.ttf
- beep02.wav
- homeBG.jpg
- liwanag.gif
- main.py
- screen1.kv
- simpletix.ttf
main.py:
from kivymd.app import MDApp
from kivy.uix.screenmanager import ScreenManager, Screen
from kivy.core.window import Window
from kivy.lang.builder import Builder
from kivy.clock import Clock
from kivy.animation import Animation
from kivy.core.audio import SoundLoader
Window.size = (400, 700)
class SplashScreen(Screen):
def on_enter(self, *args):
Clock.schedule_once(self.switch_to_home, 5)
def switch_to_home(self, *args):
self.manager.current = 'home'
class HomeScreen(Screen):
id = 1
def on_enter(self):
self.start1()
def start1(self, *args):
if self.id > 5:
self.manager.current = 'feedback'
return
anim = Animation(opacity=1, duration=1)
anim += Animation(opacity=1, duration=3)
anim += Animation(opacity=0, duration=1)
anim.bind(on_complete=self.start1)
anim.start(self.ids[f"text{self.id}"])
if self.id <= 5:
self.id += 1
class FeedbackOption(Screen):
def on_enter(self):
sound = SoundLoader.load('beep02.wav')
sound.play()
class CameraScreen(Screen):
pass
class WindowManager(ScreenManager):
pass
class Screen(MDApp):
def build(self):
kv = Builder.load_file('screen1.kv')
return kv
if __name__ == '__main__':
Screen().run()
screen1.kv:
WindowManager:
SplashScreen:
name: "splash"
HomeScreen:
name: "home"
FeedbackOption:
name: "feedback"
CameraScreen:
name: "camera"
<SplashScreen>:
MDFloatLayout:
md_bg_color: 1, 1, 1, 1
Image:
source: "liwanag.gif"
size_hint: 0.5, 0.5
pos_hint: {'center_x': 0.5,'center_y': 0.6}
anim_delay: 0
anim_loop: 1
MDLabel:
text: "Liwanag"
pos_hint: {'center_x': 0.5, 'center_y': 0.25}
halign: 'center'
theme_text_color: 'Custom'
text_color: 0,0,0,1
font_size: "45sp"
font_name: "Amellia.ttf"
<HomeScreen>:
MDFloatLayout:
md_bg_color: 1, 1, 1, 1
Image:
keep_ratio: False
allow_stretch: True
source: "homeBG.jpg"
MDLabel:
id: text1
text: "Hello"
halign: "center"
font_name: "simpletix.ttf"
font_size: "40sp"
opacity: 0
MDLabel:
id: text2
text: "Welcome to Liwanag"
halign: "center"
font_name: "simpletix.ttf"
font_size: "25sp"
opacity: 0
MDLabel:
id: text3
text: "We offers 2 feedback features for you to choose from. Please choose an option after hearing the beep sound"
halign: "center"
font_name: "simpletix.ttf"
font_size: "20sp"
opacity: 0
MDLabel:
id: text4
text: "double tap for text-to-speech feedback"
halign: "center"
font_name: "simpletix.ttf"
font_size: "25sp"
opacity: 0
MDLabel:
id: text5
text: "triple tap for patterned vibration"
halign: "center"
font_name: "simpletix.ttf"
font_size: "25sp"
opacity: 0
<FeedbackOption>:
md_bg_color: 1, 1, 1, 1
Image:
keep_ratio: False
allow_stretch: True
source: "homeBG.jpg"
<CameraScreen>:
Button:
text: "camera"
on_release:
app.root.current = "home"
root.manager.transition.direction = "left"
I couldn't paste the contents of my buildozer and logcat here, because it's too long, but here's the buildozer.spec pastebin link and the adb logcat output.