title: How to resolve kivy app crashing on startup on Android?
body: <p>Here is the main.py file that I use for conversion.</p>
  <pre><code>from kivymd.app import MDApp
  from kivy.lang import Builder
  from kivy.uix.boxlayout import BoxLayout
  from kivy.properties import ObjectProperty, StringProperty
  from kivymd.uix.navigationdrawer import MDNavigationDrawer
  from kivymd.uix.navigationdrawer import MDNavigationLayout
  from kivy.uix.screenmanager import Screen, ScreenManager
  from kivy.core.window import Window
  
  from kivymd.uix.datatables import MDDataTable
  from kivy.metrics import dp
  from kivy.uix.anchorlayout import AnchorLayout
  from kivymd.uix.dialog import MDDialog
  from kivymd.uix.button import MDRaisedButton
  from kivymd.theming import ThemableBehavior
  from kivymd.uix.picker import MDDatePicker
  from kivymd.uix.list import OneLineListItem
  from kivymd.uix.menu import MDDropdownMenu
  
  Window.size = (360, 640)
  
  
  class AssetTypeDropItem(OneLineListItem):
      pass
  
  
  class ActionDropItem(OneLineListItem):
      pass
  
  
  class AssetNameDropItem(OneLineListItem):
      pass
  
  
  class AddInvestmentScreen(Screen):
      menu1 = None
      menu2 = None
      menu3 = None
      
      def __init__(self, **kwargs):
          super(AddInvestmentScreen, self).__init__(**kwargs)
          
      def on_enter(self, *args):
          asset_type_list = [&quot;Select Asset&quot;, &quot;Digital Gold&quot;]
          action_list = [&quot;Buy&quot;, &quot;Sell&quot;]
          asset_name = [&quot;test&quot;]
  
          asset_type_dropdown_items = [
              {
                  &quot;viewclass&quot;: &quot;AssetTypeDropItem&quot;,
                  &quot;height&quot;: dp(40),
                  &quot;text&quot;: f&quot;{i}&quot;,
                  &quot;on_release&quot;: lambda x=f&quot;{i}&quot;: self.set_item_assettype(x),
              }
              for i in asset_type_list
          ]
          self.menu1 = MDDropdownMenu(
              caller=self.ids.asset_type_dropdown,
              items=asset_type_dropdown_items,
              position=&quot;bottom&quot;,
              width_mult=2,
          )
  
          action_dropdown_items = [
              {
                  &quot;viewclass&quot;: &quot;ActionDropItem&quot;,
                  &quot;height&quot;: dp(40),
                  &quot;text&quot;: f&quot;{i}&quot;,
                  &quot;on_release&quot;: lambda x=f&quot;{i}&quot;: self.set_item_action(x),
              }
              for i in action_list
          ]
          self.menu2 = MDDropdownMenu(
              caller=self.ids.action_dropdown,
              items=action_dropdown_items,
              position=&quot;bottom&quot;,
              width_mult=2,
          )
  
          asset_name_dropdown_items = [
              {
                  &quot;viewclass&quot;: &quot;AssetNameDropItem&quot;,
                  &quot;height&quot;: dp(40),
                  &quot;text&quot;: f&quot;{i}&quot;,
                  &quot;on_release&quot;: lambda x=f&quot;{i}&quot;: self.set_item_asset_name(x),
              }
              for i in asset_name
          ]
          self.menu3 = MDDropdownMenu(
              caller=self.ids.asset_name,
              items=asset_name_dropdown_items,
              position=&quot;bottom&quot;,
              width_mult=4,
          )
  
      def set_item_assettype(self, text_item):
          self.ids.asset_type_dropdown.set_item(text_item)
          self.menu1.dismiss()
  
      def set_item_action(self, text_item):
          self.ids.action_dropdown.set_item(text_item)
          self.menu2.dismiss()
  
      def set_item_asset_name(self, text_item):
          self.ids.asset_name.text = text_item
          self.menu3.dismiss()
  
      def date_picker(self):
          dialog =MDDatePicker()
          dialog.bind(on_save=self.set_previous_date)
          dialog.open()
  
      def set_previous_date(self, instance, value, date_rang):
          self.ids.date_picker_label.text = (
              f&quot;{value.day}.{value.month}.{value.year}&quot;
          )
  
  
  class DashboardScreen(Screen):
      pass
  
  
  class DigitalGoldScreen(Screen):
  
      def load_table(self):
          layout = AnchorLayout()
          self.data_tables = MDDataTable(
              pos_hint={&quot;center_x&quot;: .5, &quot;center_y&quot;: .5},
              size_hint=(0.9, 0.6),
              column_data=[(&quot;Asset Name&quot;, dp(30)),
                           (&quot;Quantity&quot;, dp(20)),
                           (&quot;Investment&quot;, dp(20)),
                           (&quot;Sell Price/g&quot;, dp(20)),
                           (&quot;Investment Value&quot;, dp(20)),
                           (&quot;Profit&quot;, dp(20)),
                           (&quot;Profit Percent&quot;, dp(20))])
          self.add_widget(self.data_tables)
          return layout
  
      def on_pre_enter(self, *args):
          self.load_table()
  
  
  class ContentNavigationDrawer(BoxLayout):
      screen_manager = ObjectProperty()
      nav_drawer = ObjectProperty()
  
  
  sm = ScreenManager()
  sm.add_widget(DashboardScreen(name='screen-dash'))
  sm.add_widget(DigitalGoldScreen(name='screen-dgld'))
  sm.add_widget(AddInvestmentScreen(name='screen-addinvestments'))
  
  
  
  
  class MoneyManagerApp(MDApp, ThemableBehavior, Screen):
      def __init__(self, **kwargs):
          super().__init__(**kwargs)
  
  
  
      def build(self):
          pass
  
  
  if __name__ == &quot;__main__&quot;:
      MoneyManagerApp().run()
  </code></pre>
  <p>Here is the .kv file.</p>
  <pre><code>Screen:
  
      MDToolbar:
          id: toolbar
          pos_hint: {&quot;top&quot;: 1}
          elevation: 10
          title: &quot;Dashboard&quot;
          left_action_items: [[&quot;menu&quot;, lambda x: nav_drawer.set_state(&quot;open&quot;)]]
  
  
      MDNavigationLayout:
          ScreenManager:
              id: screen_manager
  
  
              DashboardScreen:
              DigitalGoldScreen:
              AddInvestmentScreen:
  
  
  
          MDNavigationDrawer:
              id: nav_drawer
  
              ContentNavigationDrawer:
                  screen_manager: screen_manager
                  nav_drawer: nav_drawer
  
  &lt;AssetTypeDropItem&gt;:
      text: root.text
  
  &lt;AddInvestmentScreen&gt;:
      name: 'screen-addinvestments'
  
      MDBoxLayout:
          spacing: &quot;20dp&quot;
          orientation: &quot;vertical&quot;
          adaptive_size: True
          pos_hint: {&quot;center_x&quot;:.5, &quot;center_y&quot;:.5}
  
          MDBoxLayout:
              orientation: &quot;vertical&quot;
              adaptive_size: True
              spacing: &quot;24dp&quot;
  
              MDRaisedButton:
                  text: &quot;Select Investment Date&quot;
                  on_release: root.date_picker()
  
              MDLabel:
                  id: date_picker_label
                  adaptive_size: False
                  halign: &quot;center&quot;
                  text: &quot;01.01.20&quot;
  
          MDDropDownItem:
              id: asset_type_dropdown
              text: &quot;Select Asset&quot;
              current_item: &quot;Select Asset&quot;
              on_release: root.menu1.open()
  
          MDDropDownItem:
              id: action_dropdown
              text: &quot;Select Action&quot;
              current_item: &quot;Select Action&quot;
              on_release: root.menu2.open()
  
          MDTextField:
              id: asset_name
              size_hint_x: None
              width: &quot;200dp&quot;
              hint_text: &quot;Asset Name&quot;
              on_focus: if self.focus: root.menu3.open()
  
          MDTextField:
              id: quantity
              input_filter: &quot;float&quot;
              hint_text: &quot;Enter quantity&quot;
  
          MDTextField:
              id: priceperunit
              input_filter: &quot;float&quot;
              hint_text: &quot;Enter price/unit&quot;
  
  
  
  &lt;DashboardScreen&gt;:
      name: 'screen-dash'
  
      MDFloatingActionButton:
          icon: &quot;plus&quot;
          elevation: 8
          pos_hint: {&quot;center_x&quot;: .85, &quot;center_y&quot;:.1}
          on_press:
              root.manager.current = &quot;screen-addinvestments&quot;
              app.root.ids.toolbar.title = &quot;Add Investments&quot;
  
  
  &lt;DigitalGoldScreen&gt;:
      name: 'screen-dgld'
  
  
      MDRectangleFlatButton:
          text: 'Back'
          pos_hint: {'center_x':0.5,'center_y':0.1}
          on_press: root.manager.current = 'screen-dash'
  
      MDIconButton:
          icon: &quot;refresh&quot;
          elevation:10
          pos_hint: {&quot;center_x&quot;: .9, &quot;center_y&quot;: .85}
          user_font_size: &quot;40sp&quot;
  
  &lt;ContentNavigationDrawer&gt;:
  
      ScrollView:
  
          MDList:
  
              OneLineListItem:
                  text: &quot;Digital Gold&quot;
                  on_press:
                      root.nav_drawer.set_state(&quot;close&quot;)
                      root.screen_manager.current = &quot;screen-dgld&quot;
                      app.root.ids.toolbar.title = &quot;Digital Gold&quot;
  
  
              OneLineListItem:
                  text: &quot;Dashboard&quot;
                  on_press:
                      root.nav_drawer.set_state(&quot;close&quot;)
                      root.screen_manager.current = &quot;screen-dash&quot;
                      app.root.ids.toolbar.title = &quot;Dashboard&quot;
  </code></pre>
  <p>Whenever I create a build and transfer it to any of my devices, the app crashes everytime on startup and therefore never starts. I am using the latest version of all libraries and it didn't happen in the past. Though this app is based on a different kivy version than my previous experiments of building apps, I don't think that is responsible for it or maybe, idk.</p>
  <p>If anymore details are required, I can readily publish them.</p>
  <p>python version: 3.8
  kivy version: 2.0.0</p>