Apk文件已崩溃,由buildozer实现

时间:2018-07-28 07:31:58

标签: android python kivy buildozer

我是buildozer和kivy的新手。我已经在kivy中实现了布局,并尝试使用buildozer来实现apk,已经创建了apk,但是每次我在android设备上运行它时都会崩溃。我之前已经建立了一些页面,但是此页面是唯一崩溃的页面。我不确定原因,这是因为我使用的是框布局或固定的高度,还是使用滚动视图?

RootWidget:
RelativeLayout:
    id: user_container
    size:(root.width,root.height)
    canvas:
        Color:
            rgba: .98823529411,.98823529411,.98823529411,1
        Rectangle:
            pos: self.pos
            size: self.size
    pos: (root.width * .011, root.height *.011)
    ScrollView:
        size:self.size
        pos: (root.width * .01, root.height *.001)
        BoxLayout:
            orientation:'vertical'
            size:(740,1200)
            size_hint:1,None
            spacing:20
            #pos: (root.width * .050, root.height *.053)
            canvas:
                Color:
                    rgba: .98823529411,.98823529411,.98823529411,1 
                Rectangle:
                    pos: self.pos
                    size: self.size
            BoxLayout:
                orientation:'horizontal'
                spacing:20
                BoxLayout:
                    canvas:
                        Color:
                            rgba: .949,.976,.917, 1
                        Rectangle:
                            pos: self.pos
                            size: self.size
                    orientation:'vertical'
                    Label:
                        text:"choose one or moro answer"
                        color:.501,.756,.172, 1
                        font_size:'17sp'
                    Label:
                        text:"0 is even number"
                        color:.501,.756,.172, 1
                        font_size:'17sp'
                    BoxLayout:
                        orientation:'horizontal'
                        CheckBox:
                            size_hint_x:.2
                            on_active:

                            Image:                  
                                source: "resource/images/icon/checked_checkbox_green_32.png"
                                y: self.parent.y + self.parent.height - 75
                                x: self.parent.x-13
                                height:50
                        Label:
                            text:'answer one'
                            size_hint_x:.3
                            color:.501,.756,.172, 1
                            font_size:'17sp'
                        Label:
                            size_hint_x:.5
                    BoxLayout:
                        orientation:'horizontal'
                        CheckBox:
                            size_hint_x:.2
                            on_active:

                            Image:                  
                                source: "resource/images/icon/unchecked_checkbox_green_32.png"
                                y: self.parent.y + self.parent.height - 75
                                x: self.parent.x-13
                                height:50
                        Label:
                            text:'answer two'
                            size_hint_x:.3
                            color:.501,.756,.172, 1
                            font_size:'17sp'
                        Label:
                            size_hint_x:.5
                    BoxLayout:
                        orientation:'horizontal'
                        CheckBox:
                            size_hint_x:.2
                            on_active:

                            Image:                  
                                source: "resource/images/icon/unchecked_checkbox_green_32.png"
                                y: self.parent.y + self.parent.height - 75
                                x: self.parent.x-13
                                height:50
                        Label:
                            text:'answer three'
                            size_hint_x:.3
                            color:.501,.756,.172, 1
                            font_size:'17sp'
                        Label:
                            size_hint_x:.5
                    BoxLayout:
                        orientation:'horizontal'
                        CheckBox:
                            size_hint_x:.2
                            on_active:

                            Image:                  
                                source: "resource/images/icon/checked_checkbox_green_32.png"
                                y: self.parent.y + self.parent.height - 75
                                x: self.parent.x-13
                                height:50
                        Label:
                            text:'answer four'
                            size_hint_x:.3
                            color:.501,.756,.172, 1
                            font_size:'17sp'
                        Label:
                            size_hint_x:.5

                BoxLayout:
                    orientation:'vertical'
                    canvas:
                        Color:
                            rgba: .949,.976,.917, 1
                        Rectangle:
                            pos: self.pos
                            size: self.size
                    Label:
                        text:"choose one or moro answer"
                        color:.501,.756,.172, 1
                        font_size:'17sp'
                    Label:
                        text:"0 is even number"
                        color:.501,.756,.172, 1
                        font_size:'17sp'
                    BoxLayout:
                        orientation:'horizontal'
                        CheckBox:
                            size_hint_x:.2
                            on_active:
                            group:'two'
                            Image:                  
                                source: "resource/images/icon/checked_radio_button_green_32.png"
                                y: self.parent.y + self.parent.height - 75
                                x: self.parent.x-11
                                height:50
                        Label:
                            text:'answer one'
                            size_hint_x:.3
                            color:.501,.756,.172, 1
                            font_size:'17sp'
                        Label:
                            size_hint_x:.5
                    BoxLayout:
                        orientation:'horizontal'
                        CheckBox:
                            size_hint_x:.2
                            on_active:
                            group:'two'
                            Image:                  
                                source: "resource/images/icon/unchecked_radio_button_green_32.png"
                                y: self.parent.y + self.parent.height - 75
                                x: self.parent.x-11
                                height:50
                        Label:
                            text:'answer two'
                            size_hint_x:.3
                            color:.501,.756,.172, 1
                            font_size:'17sp'
                        Label:
                            size_hint_x:.5
                    BoxLayout:
                        orientation:'horizontal'
                        CheckBox:
                            size_hint_x:.2
                            on_active:
                            group:'two'
                            Image:                  
                                source: "resource/images/icon/unchecked_radio_button_green_32.png"
                                y: self.parent.y + self.parent.height - 75
                                x: self.parent.x-11
                                height:50
                        Label:
                            text:'answer three'
                            size_hint_x:.3
                            color:.501,.756,.172, 1
                            font_size:'17sp'
                        Label:
                            size_hint_x:.5
                    BoxLayout:
                        orientation:'horizontal'
                        CheckBox:
                            size_hint_x:.2
                            on_active:
                            group:'two'
                            Image:                  
                                source: "resource/images/icon/checked_radio_button_green_32.png"
                                y: self.parent.y + self.parent.height - 75
                                x: self.parent.x-11
                                height:50
                        Label:
                            text:'answer four'
                            size_hint_x:.3
                            color:.501,.756,.172, 1
                            font_size:'17sp'
                        Label:
                            size_hint_x:.5
            BoxLayout:
                orientation:'horizontal'
                spacing:20
                BoxLayout:
                    orientation:'vertical'
                    canvas:
                        Color:
                            rgba: .949,.976,.917, 1
                        Rectangle:
                            pos: self.pos
                            size: self.size
                    Label:
                        text:"choose one or moro answer"
                        color:.501,.756,.172, 1
                        font_size:'17sp'
                    Label:
                        text:"0 is even number"
                        color:.501,.756,.172, 1
                        font_size:'17sp'
                    BoxLayout:
                        orientation:'horizontal'
                        CheckBox:
                            size_hint_x:.2
                            on_active:

                            Image:                  
                                source: "resource/images/icon/checked_checkbox_green_32.png"
                                y: self.parent.y + self.parent.height - 75
                                x: self.parent.x-13
                                height:50
                        Label:
                            text:'answer one'
                            size_hint_x:.3
                            color:.501,.756,.172, 1
                            font_size:'17sp'
                        Label:
                            size_hint_x:.5
                    BoxLayout:
                        orientation:'horizontal'
                        CheckBox:
                            size_hint_x:.2
                            on_active:

                            Image:                  
                                source: "resource/images/icon/checked_checkbox_green_32.png"
                                y: self.parent.y + self.parent.height - 75
                                x: self.parent.x-13
                                height:50
                        Label:
                            text:'answer two'
                            size_hint_x:.3
                            color:.501,.756,.172, 1
                            font_size:'17sp'
                        Label:
                            size_hint_x:.5
                    BoxLayout:
                        orientation:'horizontal'
                        CheckBox:
                            size_hint_x:.2
                            on_active:

                            Image:                  
                                source: "resource/images/icon/unchecked_checkbox_green_32.png"
                                y: self.parent.y + self.parent.height - 75
                                x: self.parent.x-13
                                height:50
                        Label:
                            text:'answer three'
                            size_hint_x:.3
                            color:.501,.756,.172, 1
                            font_size:'17sp'
                        Label:
                            size_hint_x:.5
                    BoxLayout:
                        orientation:'horizontal'
                        CheckBox:
                            size_hint_x:.2
                            on_active:

                            Image:                  
                                source: "resource/images/icon/checked_checkbox_green_32.png"
                                y: self.parent.y + self.parent.height - 75
                                x: self.parent.x-13
                                height:50
                        Label:
                            text:'other'
                            size_hint_x:.3
                            color:.501,.756,.172, 1
                            font_size:'17sp'
                        TextInput:
                            size_hint_x:.5
                            foreground_color: .26,.26,.3,1
                            hint_text_color:(.501,.756,.172, 1)
                            font_size:'17sp'
                            multiline: True
                            hint_text:'suggestion'
                            padding_y:35
                            height:50
                            background_normal: "resource/images/form_screen/text_input_box_green.jpg"
                            background_active: "resource/images/form_screen/text_input_box_red.jpg"

                BoxLayout:
                    orientation:'vertical'
                    canvas:
                        Color:
                            rgba: .949,.976,.917, 1
                        Rectangle:
                            pos: self.pos
                            size: self.size
                    Label:
                        text:'true/false'
                        color:.501,.756,.172, 1
                        font_size:'17sp'    
                    Label:
                        text:'O is even number'
                        color:.501,.756,.172, 1
                        font_size:'17sp' 
                    BoxLayout:
                        orientation:'horizontal'
                        Label:
                            text:'false'
                            size_hint_x:.25
                            color:.501,.756,.172, 1
                            font_size:'17sp' 
                        CheckBox:
                            size_hint_x:.25
                            on_active:
                            group:'true'
                            Image:                  
                                source: "resource/images/icon/cross_not_ok_red_32.png"
                                y: self.parent.y + self.parent.height - 125
                                x: self.parent.x-4
                                height:50

                        Label:
                            text:'true'
                            size_hint_x:.25
                            color:.501,.756,.172, 1
                        CheckBox:
                            size_hint_x:.25
                            on_active:
                            group:'true'
                            Image:                  
                                source: "resource/images/icon/check_ok_green_32.png"
                                y: self.parent.y + self.parent.height - 125
                                x: self.parent.x-4
                                height:50

0 个答案:

没有答案