本文介绍了IBM工作灯6.0 - Dojo应用程序不会对三星Galaxy S3工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直没能得到任何工作灯/道场应用在三星Galaxy S3工作。我已经把在工作灯工作室V6琐碎工作灯的应用程序。它有2次。第一种观点有一个文本框和一个按钮,第二视图有一个文本框。

I haven't been able to get any worklight/dojo apps to work on the Samsung Galaxy S3. I have put together a trivial Worklight application in Worklight Studio v6. It has 2 views. The first view has a text box and a button, the second view has a text box.

<div data-dojo-type="dojox.mobile.ScrollableView" id="view0"
    data-dojo-props="selected:true">
    <div data-dojo-type="dojox.mobile.Heading"
        data-dojo-props="label:'Page 0'"></div>
    <input data-dojo-type="dojox.mobile.TextBox">
    <button data-dojo-type="dojox.mobile.Button" id="theButton">Page
        1</button>
</div>
<div data-dojo-type="dojox.mobile.View" id="view1">
    <div data-dojo-type="dojox.mobile.Heading"
        data-dojo-props="label:'Page 1',back:'back',moveTo:'view0'"></div>
    <input data-dojo-type="dojox.mobile.TextBox">
</div>

上view0按钮被连接到一个处理程序,过渡到VIEW1,并在厂景头有一个后退按钮。

The button on view0 is connected to a handler that transition to view1, and the header on view1 has a back button.

        dijit.registry.byId("theButton").on("click", function() {
            dijit.registry.byId("view0").performTransition("view1", 1, "slide");
        });

这就是所有的应用程序。它的工作原理无处不在我已经尝试过(仿真器和摩托罗拉Droid 4)除了在Galaxy S3。在Galaxy,它看起来像道场解析器失败。该网页是白色的,从文本框和按钮的两个视图所示的初始页面上,但没有头,当你点击按钮没有任何反应。无论是摩托罗拉(它的工作原理)和三星(它不)正在运行Android 4.1.2。

That's all there is to the app. It works everywhere I've tried it (emulators and Motorola Droid 4) except on the Galaxy S3. On the Galaxy, it looks like the dojo parser is failing. The page is white, the text boxes and button from both views are shown on the initial page, but there are no headers and nothing happens when you click on the button. Both the Motorola (where it works), and the Samsung (where it doesn't) are running Android 4.1.2.

展望LogCat中为三星,我看到了一些错误,我没有看到其他平台上:

Looking in LogCat for the Samsung, I see a few errors that I don't see on other platforms:

08-01 16:51:42.752: D/SimpleTest(26821): before: app init onSuccess
08-01 16:51:42.782: E/SpannableStringBuilder(26821): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
08-01 16:51:42.782: E/SpannableStringBuilder(26821): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
08-01 16:51:42.782: D/SimpleTest(26821): after: app init onSuccess
08-01 16:51:42.782: D/SimpleTest(26821): added onPause event handler 
08-01 16:51:42.782: D/SimpleTest(26821): wlclient init success
08-01 16:51:44.464: D/DroidGap(26821): onMessage(spinner,stop)
08-01 16:52:07.038: D/CordovaLog(26821): Error: scriptError
08-01 16:52:07.038: E/Web Console(26821): Error: scriptError:21
08-01 16:52:07.088: D/CordovaLog(26821): Error: scriptError
08-01 16:52:07.088: E/Web Console(26821): Error: scriptError:21

周围的Googling,我找到了SPAN_EXCLUSIVE_EXCLUSIVE错误引用。这似乎是与Swype的,或SwiftKey键盘,或三星的TouchWiz相关联。对这个问题最引用来自乡亲做Android原生开发,而不是混合动力应用的发展,比禁用键盘等,我没有找到很多答案。
我试图禁用的Swype键盘,但这并没有改变任何东西。
有其他人看到这个问题?有没有人得到了一个工作灯6道场应用在银河S3运行?

Googling around, I find references to the SPAN_EXCLUSIVE_EXCLUSIVE error. It seems to be associated with the Swype, or SwiftKey keyboards, or to Samsung TouchWiz. Most references to this problem are from folks doing Android native development, not hybrid app development, and other than disabling keyboards, I'm not finding many answers.I tried disabling the Swype keyboard, but that didn't change anything.Has anyone else seen this problem? Has anyone gotten a Worklight 6 dojo app to run on a Galaxy S3?

推荐答案

尝试在你的WWW /文件夹层使用这种移动UI的layer.js。
只需复制该文件,并重新编译应用程序。

Try to use this 'mobile-ui-layer.js' in your www/layers folder.Just copy the file and recompile the application.

此修复程序是基于以下问题:

The fix is based on the following problem:


  • <一个href=\"http://stackoverflow.com/questions/17543998/ibm-worklight-6-0-how-to-include-dojo-patch-with-$p$p-built-dojo-layers\">IBM工作灯6.0 -

这篇关于IBM工作灯6.0 - Dojo应用程序不会对三星Galaxy S3工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 01:24