Ubuntu KivyMD错误:名称为“ 1”的无屏幕。怎么修?

时间:2019-05-23 19:40:21

标签: python kivy kivy-language

我安装了KivyMD,并尝试制作2个屏幕。在Windows中一切正常,但是在Ubuntu中,我得到一个错误。我做错了什么?

#:import MDDropdownMenu kivymd.menu.MDDropdownMenu
#:import MDRaisedButton kivymd.button.MDRaisedButton
#:import MDBottomNavigation kivymd.tabs.MDBottomNavigation
#:import MDBottomNavigationItem kivymd.tabs.MDBottomNavigationItem
#:import Toolbar kivymd.toolbar.Toolbar
#:import NavigationDrawerToolbar kivymd.navigationdrawer.NavigationDrawerToolbar

ScreenManager:
    Screen:
        name: 'remind'

        MDBottomNavigation:
            MDBottomNavigationItem:
                name: '1'

                MDRaisedButton:
                    text: '1st screen button'

            MDBottomNavigationItem:
                name: '2'

                MDRaisedButton:
                    text: '2nd screen button'

我收到此错误: kivy.uix.screenmanager.ScreenManagerException:没有名称为“ 1”的屏幕

0 个答案:

没有答案