worklight 无法在真实设备上要求 DOJO Combobox - 无法加载... /dijit/form/nls/it/ComboBox.js
Posted
技术标签:
【中文标题】worklight 无法在真实设备上要求 DOJO Combobox - 无法加载... /dijit/form/nls/it/ComboBox.js【英文标题】:worklight fail to require DOJO Combobox on real device -fail to load ... /dijit/form/nls/it/ComboBox.js 【发布时间】:2013-08-27 07:53:49 【问题描述】:道场 1.8 工作灯 5.0.6
在浏览器和 android 模拟器上一切正常,但如果我在真实环境中执行应用程序,则解析不起作用。 这是 Dojo.js
function dojoInit()
require([ "dojo",
"dojo/parser", "dojox/mobile", "dojox/mobile/compat",
"dojox/mobile/ScrollableView",
"dojox/mobile/ScreenSizeAware",
"dojox/mobile/FixedSplitter",
"dojox/mobile/Container",
"dojox/mobile/ComboBox"
],
function(dojo)
dojo.ready(function()
);
);
这是平板电脑浏览器的错误:
xxx.26.81:8080/apps /services/preview/AcgTablet/common/0/default/dijit/form/nls/it/ComboBox.js Error dojo.js:26
但是这个错误不会出现在电脑浏览器上 但是文件夹里有!
【问题讨论】:
【参考方案1】:您可能正在使用 Worklight V6?
目前在 Android 设备上运行存在问题。您可以在此处找到解决方法:Worklight core-web-layer.js errors
For your issue with running on Android, if you're using Worklight 6.0 with a new project, copy the following files from the Dojo Library project that was created alongside the Worklight project:
toolkit/dojo/dojo/nls/core-web-layer_ROOT.js
toolkit/dojo/dojo/nls/mobile-ui-layer_ROOT.js
These files then must be added to your Worklight project's www/dojo/nls/ directory.
In addition to including the *_ROOT.js files, you may also need to remove the development configuration from the application. To do this, open the Console view (Window > Show View > Other... > Console). From the Console view, click the Open Console button and choose Dojo Library Requests from the list. From the Dojo Library Requests console, click the View Menu (the triangle in the toolbar), and uncheck Provide Library Resources. After this, build and deploy your application to your emulator or device.
【讨论】:
我使用 WL 5.06 。如果我删除组合框,一切正常。但是,如果我添加组合框并需要组合框,则会出现错误 不确定这个错误是否也存在于以前版本的 Worklight 中,我想尝试一下也没有什么坏处。我的行为与您在 V6 中描述的此错误相同。【参考方案2】:你尝试过这样做吗?
function dojoInit()
require(["dojo/ready",
"dojox/mobile/parser",
"dojox/mobile",
"dojox/mobile/compat",
"dojox/mobile/ScrollableView",
"dojox/mobile/ScreenSizeAware",
"dojox/mobile/FixedSplitter",
"dojox/mobile/Container",
"dojox/mobile/ComboBox",
"dojo/ready!"
],
function(ready,parser,Container,ComboBox)
ready(function()
alert("I was clicked");
);
// Parse the page for widgets!
parser.parse();
);
问候
【讨论】:
以上是关于worklight 无法在真实设备上要求 DOJO Combobox - 无法加载... /dijit/form/nls/it/ComboBox.js的主要内容,如果未能解决你的问题,请参考以下文章
无法在真实设备 android 中运行 IBM worklight 应用程序
IBM Worklight 6.0 - 无法在 avd 上使用适用于 android 环境的 dojo 工具包运行示例混合 Worklight 应用程序?
IBM Worklight 6.0 - 使用 Web 服务的混合应用程序无法在实际设备上运行?