每个新的 SAPUI5 项目都显示一个空白页
Every new SAPUI5 Project is showing a blank page
我每次设置新的 sapui5 项目时,都没有显示任何内容,只有一个空白页面。
我已经看过控制台了,有些东西不见了。我已经更改了 index.html 语言并尝试了来自互联网的不同内容。
一旦我遇到问题,它就会突然自行解决。我还重置了缓存,这对我有用一次。我正在使用本地 sap 网络 IDE.
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta charset="UTF-8">
<title>test_chart</title>
<script id="sap-ui-bootstrap"
src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js"
data-sap-ui-libs="sap.m"
data-sap-ui-theme="sap_belize"
data-sap-ui-compatVersion="edge"
data-sap-ui-resourceroots='{"test_charttest_chart": ""}'>
</script>
<link rel="stylesheet" type="text/css" href="css/style.css">
<script>
sap.ui.getCore().attachInit(function() {
new sap.m.Shell({
app: new sap.ui.core.ComponentContainer({
height : "100%",
name : "test_charttest_chart"
})
}).placeAt("content");
});
</script>
</head>
<body class="sapUiBody" id="content">
</body>
</html>
只是添加一个答案(因为问题已解决)。问题是应用程序试图加载仅在 SAPUI5 中可用但在 Open 中不可用的资源UI5(例如 sap.ushell
)。
<script id="sap-ui-bootstrap" src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js" ...>
Failed to load sap/ushell/library.js
from ...
如果您拥有从 CDN 使用 SAPUI5 的适当许可,只需将 src="https://openui5.hana...."
替换为 SAPUI5 资源的目的地(例如 src="https://sapui5.hana...."
)。
为了继续使用 OpenUI5,请在 index.html
和 manifest.json
中查找 SAPUI5 依赖项,然后将其删除。
我每次设置新的 sapui5 项目时,都没有显示任何内容,只有一个空白页面。
我已经看过控制台了,有些东西不见了。我已经更改了 index.html 语言并尝试了来自互联网的不同内容。 一旦我遇到问题,它就会突然自行解决。我还重置了缓存,这对我有用一次。我正在使用本地 sap 网络 IDE.
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta charset="UTF-8">
<title>test_chart</title>
<script id="sap-ui-bootstrap"
src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js"
data-sap-ui-libs="sap.m"
data-sap-ui-theme="sap_belize"
data-sap-ui-compatVersion="edge"
data-sap-ui-resourceroots='{"test_charttest_chart": ""}'>
</script>
<link rel="stylesheet" type="text/css" href="css/style.css">
<script>
sap.ui.getCore().attachInit(function() {
new sap.m.Shell({
app: new sap.ui.core.ComponentContainer({
height : "100%",
name : "test_charttest_chart"
})
}).placeAt("content");
});
</script>
</head>
<body class="sapUiBody" id="content">
</body>
</html>
只是添加一个答案(因为问题已解决)。问题是应用程序试图加载仅在 SAPUI5 中可用但在 Open 中不可用的资源UI5(例如 sap.ushell
)。
<script id="sap-ui-bootstrap" src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js" ...>
Failed to load
sap/ushell/library.js
from ...
如果您拥有从 CDN 使用 SAPUI5 的适当许可,只需将 src="https://openui5.hana...."
替换为 SAPUI5 资源的目的地(例如 src="https://sapui5.hana...."
)。
为了继续使用 OpenUI5,请在 index.html
和 manifest.json
中查找 SAPUI5 依赖项,然后将其删除。