一段时间后在地图应用中添加地面叠加层时崩溃

时间:2019-01-28 11:18:56

标签: android google-maps android-studio

在地图上添加groundOverlays后出现这些错误

E / gralloc:gralloc_map:无法映射出内存不足

E / GraphicBuffer:未展平:registerBuffer失败:未知错误-2(2)

E /曲面:dequeueBuffer:IGraphicBufferProducer :: requestBuffer失败:2  A / OpenGLRenderer:无法在表面0xebd0cac0上设置损坏区域,错误= EGL_BAD_ACCESS

A / libc:致命信号6(SIGABRT),tid 31899(RenderThread)中的代码-6,pid 31847

这是我的代码:

import QtQuick 2.9
import QtQuick.Controls 1.4
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import QtQuick.Controls.Styles 1.4

ApplicationWindow {
    id: window
    title: "Stack"
    visible: true
    height: 200
    width: 400
    ListModel {
        id: libraryModel
        ListElement {
            text: "A Masterpiece"
        }
        ListElement {
            text: "Brilliance"
        }
        ListElement {
            text: "Outstanding"
        }
    }

    Item {
        id: page
        anchors.fill: parent
        width:parent.width
        height: parent.height
        ScrollView {
            id:scrollView
            anchors.fill:parent
            style: ScrollViewStyle{
                handle: Rectangle {
                    implicitWidth: 30
                    color:  "black"
                }
                scrollToClickedPosition: true
                transientScrollBars:true
            }
            function scrollToY(y) {
                scrollView.contentItem.contentY = y;
            }
            Column{
                width:parent.width
                spacing:10
                TextField {
                    id:textField
                    implicitHeight: 30
                    font.bold: true
                    onFocusChanged: if(focus) { scrollView.scrollToY(y); }
                }
                ComboBox {
                    id:comboBox
                    anchors.topMargin: 10
                    textRole: "text"
                    model: libraryModel
                    onFocusChanged: if(focus) { scrollView.scrollToY(y); }
                }
                SpinBox {
                    width: 100
                    height: 30
                    editable: true
                }
                SpinBox {
                    width: 100
                    height: 30
                    editable: true
                }
            }
        }
    }
}

0 个答案:

没有答案