zl程序教程

您现在的位置是:首页 >  其他

当前栏目

SAP UI5 clone 到 WebIDE后,加载 sap-ui-core.js 后出现 404 Not found 错误的原因

SAPJS错误CoreUI not 加载 出现
2023-09-14 09:03:54 时间

Created by Jerry Wang, last modified on Mar 03, 2015

After you have cloned one project from github to Webide as below:
clipboard1
When you launch the project you will meet with the error message below:
clipboard2
There is a 404 not found error:
clipboard3
Compared to a normal project which is created via WebIDE itself, it is easy to figure out that a file is missing:
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-810rh7ub-1616911809509)(https://user-images.githubusercontent.com/5669954/27469392-9a31068a-57ef-11e7-95f1-264446b562fc.png)]

This neo-app.json is necessary for WebIDE to launch the ui5 application, and it will be automatically created by WebIDE if you create a new project there - normally we do not need to change it manually. However, if you clone a ui5 project which is not created by WebIDE ( for example created by Eclipse ), then you have to add this neo-app.json manually.

For entryPath you can just keep its default value, and the mapping for it could be customized, as displayed in the example below:
clipboard5
Then in your index.html you have to use the customized path accordingly:
clipboard6
And in the runtime it works as designed:
clipboard7
clipboard8