Note that there are some explanatory texts on larger screens.

plurals
  1. POWorklight mobile app doesn't load dojo mobile widgets on android 4.x devices
    text
    copied!<p>I'm working on a mobile app, using Worklight (Hybrid Application) with Dojo Mobile. It has 3 views with a List in each one that show some hardcoded data.</p> <p>When I run it in the Mobile Browser Simulator it works ok (Both 'Preview as common resources' and 'Android' views). With all the Dojo widgets loaded.</p> <p>When I run it on a physical android mobile it seems to work only on those with android version 2.x.x, but it doesn't on android version 4.x.x. It doesn't load the dojo mobile widgets. It shows the three views in one simple html page.</p> <p>The messages that appears in the log are the following:</p> <pre><code>11-29 19:49:44.081: D/DemoApp(6088): wlclient init started 11-29 19:49:44.091: D/DemoApp(6088): Read cookies: null 11-29 19:49:44.091: D/DemoApp(6088): CookieMgr read cookies: {} 11-29 19:49:44.231: D/DemoApp(6088): before: app init onSuccess 11-29 19:49:44.252: D/DemoApp(6088): after: app init onSuccess 11-29 19:49:44.252: D/DemoApp(6088): added onPause event handler 11-29 19:49:44.252: D/DemoApp(6088): wlclient init success 11-29 19:49:45.703: D/chromium(6088): Unknown chromium error: -6 11-29 19:49:45.703: D/chromium(6088): Unknown chromium error: -6 11-29 19:49:45.973: D/CordovaLog(6088): Error: scriptError 11-29 19:49:45.973: E/Web Console(6088): Error: scriptError at file:///data/data/com.DemoApp/files/www/default/dojo/dojo.js:21 11-29 19:49:45.983: D/CordovaLog(6088): Error: scriptError 11-29 19:49:45.983: E/Web Console(6088): Error: scriptError at file:///data/data/com.DemoApp/files/www/default/dojo/dojo.js:21 11-29 19:50:07.554: D/CordovaWebView(6088): The current URL is: file:///data/data/com.DemoApp/files/www/default/DemoApp.html 11-29 19:50:07.554: D/CordovaWebView(6088): The URL at item 0 is:file:///data/data/com.DemoApp/files/www/default/DemoApp.html </code></pre> <p>Looking for "dojo.js:21" error on google I've found some possible solutions:</p> <ul> <li>Make sure to have all dojo required files under www folder...</li> <li>Uncheck "Provide Library Resources" option from Dojo Library Request console before the project building...</li> <li>Reeplace core-web-layer_ROOT.js and mobile-ui-layer_ROOT.js from www/dojo/nls/ with the ones in toolkit/dojo/dojo/nls</li> <li>Trigger dojo parser manually...</li> </ul> <p>But none of these solutions have worked.</p> <p>I've tried to build the app with android api 8, 15 and 18. Always with the same results.</p> <p>I was working with:</p> <ul> <li>Worklight ver: 6.0.0.20130926-1933</li> <li>Dojo Toolkit SDK 1.8.1 for Worklight</li> <li>Android Development Toolkit ver: 22.3.0.v201310242005-887826</li> </ul> <p>And recently I've upgraded Worklight with the latest release:</p> <ul> <li>Worklight ver: 6.1.0.20131126-0630</li> <li>Dojo Toolkit SDK 1.9.1 for Worklight</li> <li>Android Development Toolkit ver: 22.3.0.v201310242005-887826</li> </ul> <p>Any help would be very appreciated.</p> <p>Thanks!!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload