我有一个 SAP CAP 全栈应用程序。 我还有一些自定义 ui5 代码 - xml 视图和 js 控制器。 一切工作正常,但如果我只是更改manifest.json文件中的
sap.app.id
(从test-reporting-app更改为test-reporting-app-predev),在SAP Build中打开应用程序时我开始收到错误工作区。错误是:
错误:无法从 https://sapui5.hana.ondemand.com/1.123.2/resources/test-reporting-app/view/App 加载资源 test-reporting-app/view/App.view.xml .view.xml。检查“未找到文件”或解析错误。理由:
在 https://sapui5.hana.ondemand.com/1.123.2/resources/sap/fiori/appruntime-min-0.js:192:2500 test-reporting-app-predev。
奇怪的是,当我在 BTP Cockpit 的 HTML5 应用程序中找到该应用程序并打开它时,它加载得很好。因此,仅当我在 SAP Build Work Zone 中打开应用程序时。
注意:部署后,我在 SAP Build Work Zone 中更新/重新加载了 HTML5 应用程序的内容。
有什么想法为什么只是更改
sap.app.id
就会导致此错误吗?
这是我的manifest.json:
{
"_version": "1.49.0",
"sap.app": {
"id": "test-reporting-app-predev", <=== I have changed only this value
"type": "application",
"i18n": "i18n/i18n.properties",
"title": "Test Reporting app PREDEV",
"description": "Test Reporting app PREDEV",
"applicationVersion": {
"version": "1.0.8"
},
"dataSources": {
"testResultsRemote": {
"uri": "/epm/testresults/",
"type": "OData",
"settings": {
"odataVersion": "4.0",
"localUri": "localService/metadata.xml"
}
},
"testResultsAggRemote": {
"uri": "/epm/resultsagg/",
"type": "OData",
"settings": {
"odataVersion": "4.0",
"localUri": "localService/metadata.xml"
}
},
"performanceResultsAggRemote": {
"uri": "/epm/resultsperfagg/",
"type": "OData",
"settings": {
"odataVersion": "4.0",
"localUri": "localService/metadata.xml"
}
},
"performanceResultsRemote": {
"uri": "/epm/testperfresults/",
"type": "OData",
"settings": {
"odataVersion": "4.0",
"localUri": "localService/metadata.xml"
}
}
},
"sourceTemplate": {
"id": "@sap/ux-app-migrator:freestyle",
"version": "1.12.5",
"toolsId": "bb6f476c-771d-46d9-b6ac-fef2d8c7e824"
},
"crossNavigation": {
"inbounds": {
"epm-test-reporting-inbound": {
"signature": {
"parameters": {},
"additionalParameters": "allowed"
},
"semanticObject": "epmtestreportingpredev",
"action": "display",
"title": "EPM Test Reporting App PREDEV",
"subTitle": "EPM Test Reporting App PREDEV",
"icon": "sap-icon://electrocardiogram"
}
}
}
},
"sap.ui": {
"technology": "UI5",
"deviceTypes": {
"desktop": true,
"tablet": true,
"phone": true
}
},
"sap.ui5": {
"rootView": {
"viewName": "test-reporting-app.view.App",
"type": "XML",
"async": true,
"id": "app"
},
"dependencies": {
"minUI5Version": "1.60",
"libs": {
"sap.m": {}
}
},
"models": {
"i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"settings": {
"bundleName": "test-reporting-app.i18n.i18n"
}
},
"testResults": {
"dataSource": "testResultsRemote",
"settings": {
"operationMode": "Server"
}
},
"testResultsAgg": {
"dataSource": "testResultsAggRemote",
"settings": {
"operationMode": "Server"
}
},
"testResultsPerfAgg": {
"dataSource": "performanceResultsAggRemote",
"settings": {
"operationMode": "Server"
}
},
"testResultsPerf": {
"dataSource": "performanceResultsRemote",
"settings": {
"operationMode": "Server"
}
}
},
"resources": {
"css": [
{
"uri": "css/style.css"
}
]
},
"routing": {
"config": {
"routerClass": "sap.m.routing.Router",
"viewType": "XML",
"viewPath": "test-reporting-app.view",
"controlId": "app",
"controlAggregation": "pages",
"async": true
},
"routes": [
{
"pattern": "",
"name": "overview",
"target": "overview"
},
{
"pattern": "xsunit/{testcase}",
"name": "xsunit",
"target": "xsunit"
},
{
"pattern": "performance",
"name": "performance",
"target": "performance"
}
],
"targets": {
"overview": {
"viewId": "overview",
"viewName": "Overview"
},
"xsunit": {
"viewId": "xsunit",
"viewName": "XsUnit"
},
"performance": {
"viewId": "performance",
"viewName": "Performance"
}
}
}
},
"sap.fiori": {
"registrationIds": [],
"archeType": "transactional"
},
"sap.cloud": {
"public": true,
"service": "epm-test-reporting-app"
}
}
文档
应用程序、组件和库的描述符 (manifest.json)中的
sap.app/id
部分的描述有帮助吗?
即将必须以点表示法提供的强制属性[...]必须是在系统中是唯一的。它 必须与相应的
Component.js
.”中提供的命名空间匹配。
sap.app/id
值更改为
"test.reporting.app.predev"
还需要更改应用程序
Component.js
名称:
return UIComponent.extend("test.reporting.app.predev.Component", {/*...*/});
确保同时更改 ui5*.yaml
文件中的 UI5 工具部分名称:
metadata:
name: test.reporting.app.predev