Worklight 5.06 和 Dojo 1.8。该应用程序适用于安卓模拟器和网络浏览器,但不适用于真实设备。这是日志:
08-08 14:58:35.520: D/dalvikvm(4470): GC_CONCURRENT freed 437K, 8% free 6855K/7431K, paused 1ms+1ms
08-08 14:58:36.880: D/dalvikvm(4470): GC_CONCURRENT freed 520K, 9% free 6851K/7495K, paused 1ms+2ms
08-08 14:58:37.330: D/dalvikvm(4470): GC_CONCURRENT freed 381K, 9% free 6858K/7495K, paused 1ms+1ms
08-08 14:58:37.890: D/dalvikvm(4470): GC_CONCURRENT freed 435K, 9% free 6856K/7495K, paused 1ms+1ms
08-08 14:58:38.530: D/dalvikvm(4470): GC_CONCURRENT freed 404K, 9% free 6856K/7495K, paused 2ms+2ms
08-08 14:58:39.390: D/dalvikvm(4470): GC_CONCURRENT freed 501K, 9% free 6861K/7495K, paused 1ms+2ms
08-08 14:58:39.870: D/dalvikvm(4470): GC_CONCURRENT freed 504K, 9% free 6861K/7495K, paused 1ms+2ms
08-08 14:58:40.590: D/dalvikvm(4470): GC_CONCURRENT freed 406K, 9% free 6869K/7495K, paused 2ms+2ms
08-08 14:58:40.630: D/dalvikvm(4470): GC_CONCURRENT freed 523K, 9% free 6855K/7495K, paused 2ms+2ms
08-08 14:58:41.360: D/dalvikvm(4470): GC_CONCURRENT freed 405K, 9% free 6852K/7495K, paused 2ms+2ms
08-08 14:58:43.910: D/dalvikvm(4470): GC_CONCURRENT freed 446K, 9% free 6854K/7495K, paused 2ms+2ms
08-08 14:58:44.170: D/WLDroidGap(4470): Finished copying files to local storage...
08-08 14:58:44.480: D/WLDroidGap(4470): no need to check web resource integrity
08-08 14:58:48.210: D/dalvikvm(4470): GC_CONCURRENT freed 382K, 9% free 6864K/7495K, paused 6ms+2ms
08-08 14:58:48.240: D/CordovaWebView(4470): >>> loadUrl(file:///data/data/com.MobileACG/files/www/skinLoader.html)
08-08 14:58:48.240: D/PluginManager(4470): init()
08-08 14:58:48.250: D/CordovaWebView(4470): >>> loadUrlNow()
08-08 14:58:48.260: D/DroidGap(4470): onMessage(onPageStarted,file:///data/data/com.MobileACG/files/www/skinLoader.html)
08-08 14:58:48.300: D/chromium(4470): Unknown chromium error: -6
08-08 14:58:48.480: D/Cordova(4470): onPageFinished(file:///data/data/com.MobileACG/files/www/skinLoader.html)
08-08 14:58:48.480: D/DroidGap(4470): onMessage(onNativeReady,null)
08-08 14:58:48.480: D/DroidGap(4470): onMessage(onPageFinished,file:///data/data/com.MobileACG/files/www/skinLoader.html)
08-08 14:58:48.490: I/SqliteDatabaseCpp(4470): sqlite returned: error code = 14, msg = cannot open file at line 27701 of [8609a15dfa], db=/data/data/com.MobileACG/databases/webview.db
08-08 14:58:48.490: I/SqliteDatabaseCpp(4470): sqlite returned: error code = 14, msg = os_unix.c: open() at line 27701 - "" errno=2 path=/CachedGeoposition.db, db=/data/data/com.MobileACG/databases/webview.db
08-08 14:58:48.510: D/CordovaNetworkManager(4470): Connection Type: wifi
08-08 14:58:48.510: D/DroidGap(4470): onMessage(networkconnection,wifi)
08-08 14:58:48.510: D/CordovaNetworkManager(4470): Connection Type: wifi
08-08 14:58:48.520: D/DroidGap(4470): onMessage(spinner,stop)
08-08 14:58:48.570: D/CordovaWebView(4470): >>> loadUrl(file:///data/data/com.MobileACG/files/www/default/MobileACG.html)
08-08 14:58:48.570: D/CordovaWebView(4470): >>> loadUrlNow()
08-08 14:58:48.570: D/DroidGap(4470): onMessage(onPageStarted,file:///data/data/com.MobileACG/files/www/default/MobileACG.html)
08-08 14:58:50.160: D/Cordova(4470): onPageFinished(file:///data/data/com.MobileACG/files/www/default/MobileACG.html)
08-08 14:58:50.160: D/DroidGap(4470): onMessage(onNativeReady,null)
08-08 14:58:50.160: D/DroidGap(4470): onMessage(onPageFinished,file:///data/data/com.MobileACG/files/www/default/MobileACG.html)
08-08 14:58:50.180: D/CordovaNetworkManager(4470): Connection Type: wifi
08-08 14:58:50.180: D/DroidGap(4470): onMessage(networkconnection,wifi)
08-08 14:58:50.190: D/CordovaNetworkManager(4470): Connection Type: wifi
08-08 14:58:50.190: D/DroidGap(4470): onMessage(spinner,stop)
08-08 14:58:50.190: D/MobileACG(4470): ondeviceready event dispatched
08-08 14:58:50.200: D/MobileACG(4470): wlclient init started
08-08 14:58:50.200: D/MobileACG(4470): Read cookies: null
08-08 14:58:50.210: D/MobileACG(4470): CookieMgr read cookies: {}
08-08 14:58:50.220: D/MobileACG(4470): before: app init onSuccess
08-08 14:58:50.220: D/MobileACG(4470): after: app init onSuccess
08-08 14:58:50.220: D/MobileACG(4470): wlclient init success
08-08 14:58:50.360: D/CordovaLog(4470): Error: multipleDefine
08-08 14:58:50.360: E/Web Console(4470): Error: multipleDefine at file:///data/data/com.MobileACG/files/www/default/dojo/dojo.js:26
08-08 14:58:50.480: D/DroidGap(4470): onMessage(spinner,stop)
08-08 14:58:51.010: D/chromium(4470): Unknown chromium error: -6
08-08 14:58:51.180: D/CordovaLog(4470): Error: scriptError
08-08 14:58:51.180: E/Web Console(4470): Error: scriptError at file:///data/data/com.MobileACG/files/www/default/dojo/dojo.js:26
这是 commonInit()
function creaOggettiDojo(){
busy.hide();//nascondo barra di caricamento
require(["dojo/ready",
"dojo/store/Memory",
"dojox/mobile/EdgeToEdgeStoreList",
"dojox/mobile",
"dojox/mobile/parser"
//"dojox/grid/DataGrid"
], function(ready, Memory, EdgeToEdgeStoreList){
busy = new WL.BusyIndicator("content", { text: "Caricamento dati clienti ..."});
这是道场js:
function wlCommonInit(){
require([ "dojo/core-web-layer", "dojo/mobile-ui-layer",
"dojo/mobile-compat-layer" ], dojoInit);
function dojoInit() {
require([ "dojo","dojo/request/script", "dojo/parser", "dojox/mobile", "dojox/mobile/compat", "dojox/mobile/deviceTheme",
"dojox/mobile/ScrollableView",
"dojox/mobile/ScreenSizeAware",
"dojox/mobile/FixedSplitter",
"dojox/mobile/Container",
"dojox/mobile/Heading",
"dojox/mobile/EdgeToEdgeList",
"dojox/mobile/ListItem",
"dojox/mobile/RoundRect",
"dojox/mobile/TabBar",
"dojox/mobile/TabBarButton",
"dojox/mobile/Button",
"dojox/mobile/GridLayout",
"dojox/mobile/Pane",
"dojox/mobile/ScrollablePane",
"dijit/form/DataList",
"dojox/mobile/ComboBox",
"dojox/mobile/EdgeToEdgeStoreList",
"dojo/store/Memory",
"dojox/mobile/EdgeToEdgeDataList",
"dojo/data/ItemFileReadStore",
"dojo/data/ItemFileWriteStore",
"dojox/mobile/ExpandingTextArea",
"dojox/mobile/ContentPane",
],
function(dojo) {
creaOggettiDojo();//Crea gli oggetti programmaticamente
这是creaOggettiDojo
function creaOggettiDojo(){
busy.hide();//nascondo barra di caricamento
require(["dojo/ready",
"dojo/store/Memory",
"dojox/mobile/EdgeToEdgeStoreList",
"dojox/mobile",
"dojox/mobile/parser"
//"dojox/grid/DataGrid"
], function(ready, Memory, EdgeToEdgeStoreList){
busy = new WL.BusyIndicator("content", { text: "Caricamento dati clienti ..."});
第一个“忙”不是隐藏的。