添加容器时未加载 XML 视图的内容

Content of XML view does not get loaded on adding a container

我的视图内容在添加 l:VerticalLayout 时未加载。如果我删除它,那么视图就可以正常工作。我也在添加 xmlns:l="sap.ui.layout"。在控制台中,它显示错误:

Uncaught (in promise) Error: resource ns/HTML5Module/view/View1.view.xml could not be loaded from ./view/View1.view.xml. Check for 'file not found' or parse errors. Reason: Error: Invalid XML: <mvc:View controllerName="ns.HTML5Module.controller.View1" xmlns:mvc="sap.ui.core.mvc" displayBlock="true" xmlns="sap.m" xmlns:l="sap.ui.layout" >"

请看下面的代码:

我正在使用 SAP Business Application Studio。

根据 spec:

Attributes must be separated from each other by one or more ASCII whitespace.

即在你的情况下,它应该是:

<!-- Correct XML syntax: one or more whitespace between the attributes: -->
<Title level="H2" text="Layout Example"></Title>

而不是:

<!-- 语法无效:`level` 和 `text` 之间没有空格:-->
<Title <strong>level="H2"text</strong>="Layout Example"></Title>