我使用 Worklight 6.1 + Dojo 1.8 开发了一个混合应用程序。该应用程序使用 Chrome“Common & Android”测试结果良好。当我将设备部署到运行 4.3 版本的 Nexus-7 平板电脑时,我的所有视图都会一起出现,而 dojo 小部件只是文本内容。
我回顾了之前的一篇文章,标题为:“Worklight 移动应用程序不会在 Android 4.x 设备上加载 dojo 移动小部件“我也遇到了同样的情况,并且我也按照网上找到的几篇帖子中提到的步骤进行操作。
•Make sure to have all dojo required files under www folder...
•Uncheck "Provide Library Resources" option from Dojo Library Request console before the
project building...
•Reeplace core-web-layer_ROOT.js and mobile-ui-layer_ROOT.js from www/dojo/nls/ with the ones
in toolkit/dojo/dojo/nls
我的设备设置为语言英语(美国) 我看到了将“dojo/nls/core-web-layer_en-us.js”移动到我的 dojo 项目的建议,但是 Worklight 创建的 DojoLib 项目没有“en”捆绑。我的印象是“en-us”本地应该是默认值,不需要复制其他文件。如果这个文件“dojo/nls/core-web-layer_en-us.js”需要成为我的项目的一部分,我不知道从哪里检索它。我将在此处附加 logcat 内容,显示应用程序部署到设备以及应用程序启动的情况。我感谢您为解决此问题提供的任何帮助::
02-11 14:25:41.892: I/CordovaLog(7468): Changing log level to DEBUG(3)
02-11 14:25:41.892: D/CordovaActivity(7468): CordovaActivity.onCreate()
02-11 14:25:41.942: D/dalvikvm(7468): GC_FOR_ALLOC freed 77K, 2% free 7778K/7920K, paused 20ms, total 21ms
02-11 14:25:41.942: I/dalvikvm-heap(7468): Grow heap (frag case) to 8.107MB for 474560-byte allocation
02-11 14:25:41.982: D/dalvikvm(7468): GC_FOR_ALLOC freed 1K, 2% free 8241K/8384K, paused 35ms, total 35ms
02-11 14:25:42.072: D/CordovaWebView(7468): CordovaWebView is running on device made by: asus
02-11 14:25:42.082: D/JsMessageQueue(7468): Set native->JS mode to 2
02-11 14:25:42.082: D/CordovaActivity(7468): CordovaActivity.init()
02-11 14:25:42.092: W/com.worklight.androidgap.analytics.WLAnalytics(7468): TLF_configurator.enable was called, but the required Tealeaf libraries are not present in the classpath.
02-11 14:25:42.112: D/Whitelist(7468): Unlimited access to network resources
02-11 14:25:42.112: I/CordovaLog(7468): Changing log level to DEBUG(3)
02-11 14:25:42.112: D/CordovaActivity(7468): Resuming the App
02-11 14:25:42.112: D/CordovaActivity(7468): CB-3064: The errorUrl is null
02-11 14:25:42.132: D/dalvikvm(7468): GC_FOR_ALLOC freed 593K, 8% free 8142K/8804K, paused 22ms, total 22ms
02-11 14:25:42.132: D/WLDroidGap(7468): no need to check web resource integrity
02-11 14:25:42.152: D/libEGL(7468): loaded /system/lib/egl/libEGL_tegra.so
02-11 14:25:42.172: D/libEGL(7468): loaded /system/lib/egl/libGLESv1_CM_tegra.so
02-11 14:25:42.182: D/libEGL(7468): loaded /system/lib/egl/libGLESv2_tegra.so
02-11 14:25:42.202: D/OpenGLRenderer(7468): Enabling debug mode 0
02-11 14:25:42.202: D/SoftKeyboardDetect(7468): Ignore this event
02-11 14:25:42.222: D/CordovaWebView(7468): >>> loadUrl(file:///data/data/com.SeterusSnapShot/files/www/default/index.html)
02-11 14:25:42.222: D/PluginManager(7468): init()
02-11 14:25:42.222: D/CordovaWebView(7468): >>> loadUrlNow()
02-11 14:25:42.252: D/CordovaActivity(7468): onMessage(onPageStarted,file:///data/data/com.SeterusSnapShot/files/www/default/index.html)
02-11 14:25:42.262: D/SoftKeyboardDetect(7468): Ignore this event
02-11 14:25:43.512: D/chromium(7468): Unknown chromium error: -6
02-11 14:25:43.512: D/chromium(7468): Unknown chromium error: -6
02-11 14:25:43.522: D/chromium(7468): Unknown chromium error: -6
02-11 14:25:43.532: D/CordovaLog(7468): file:///data/data/com.SeterusSnapShot/files/www/default/js/snapShotView.js: Line 18 : XXXXXXXXXXX Entering snapShotList() to setup loan info data.::1234567890
02-11 14:25:43.532: I/Web Console(7468): XXXXXXXXXXX Entering snapShotList() to setup loan info data.::1234567890 at file:///data/data/com.SeterusSnapShot/files/www/default/js/snapShotView.js:18
02-11 14:25:43.532: D/CordovaLog(7468): file:///data/data/com.SeterusSnapShot/files/www/default/js/snapShotView.js: Line 46 : XXXXXXXXXXX Build, or refresh the loan list information
02-11 14:25:43.532: I/Web Console(7468): XXXXXXXXXXX Build, or refresh the loan list information at file:///data/data/com.SeterusSnapShot/files/www/default/js/snapShotView.js:46
02-11 14:25:43.672: D/CordovaActivity(7468): onMessage(spinner,stop)
02-11 14:25:43.692: D/CordovaNetworkManager(7468): Connection Type: wifi
02-11 14:25:43.702: D/CordovaNetworkManager(7468): Connection Type: wifi
02-11 14:25:43.702: D/CordovaActivity(7468): onMessage(networkconnection,wifi)
02-11 14:25:43.842: D/CordovaLog(7468): file:///data/data/com.SeterusSnapShot/files/www/default/dojo/dojo.js: Line 21 : Error: scriptError
02-11 14:25:43.842: E/Web Console(7468): Error: scriptError at file:///data/data/com.SeterusSnapShot/files/www/default/dojo/dojo.js:21
02-11 14:25:43.852: D/CordovaLog(7468): file:///data/data/com.SeterusSnapShot/files/www/default/dojo/dojo.js: Line 21 : Error: scriptError
02-11 14:25:43.852: E/Web Console(7468): Error: scriptError at file:///data/data/com.SeterusSnapShot/files/www/default/dojo/dojo.js:21
02-11 14:25:43.922: D/CordovaLog(7468): file:///data/data/com.SeterusSnapShot/files/www/default/dojo/dojo.js: Line 21 : Error: scriptError
02-11 14:25:43.922: E/Web Console(7468): Error: scriptError at file:///data/data/com.SeterusSnapShot/files/www/default/dojo/dojo.js:21
02-11 14:25:43.952: D/chromium(7468): Unknown chromium error: -6
02-11 14:25:43.952: D/chromium(7468): Unknown chromium error: -6
02-11 14:25:43.972: D/TilesManager(7468): Starting TG #0, 0x62a51060
02-11 14:25:43.972: D/TilesManager(7468): new EGLContext from framework: 59f9dde0
02-11 14:25:43.972: D/GLWebViewState(7468): Reinit shader
02-11 14:25:43.982: D/GLWebViewState(7468): Reinit transferQueue
02-11 14:25:43.982: D/CordovaWebViewClient(7468): onPageFinished(file:///data/data/com.SeterusSnapShot/files/www/default/index.html)
02-11 14:25:43.982: D/CordovaActivity(7468): onMessage(onPageFinished,file:///data/data/com.SeterusSnapShot/files/www/default/index.html)
02-11 14:25:44.022: D/CordovaLog(7468): file:///data/data/com.SeterusSnapShot/files/www/default/dojo/dojo.js: Line 21 : Error: scriptError
02-11 14:25:44.022: E/Web Console(7468): Error: scriptError at file:///data/data/com.SeterusSnapShot/files/www/default/dojo/dojo.js:21
02-11 14:25:44.022: D/CordovaLog(7468): file:///data/data/com.SeterusSnapShot/files/www/default/dojo/dojo.js: Line 21 : Error: scriptError
02-11 14:25:44.022: E/Web Console(7468): Error: scriptError at file:///data/data/com.SeterusSnapShot/files/www/default/dojo/dojo.js:21
02-11 14:25:44.082: D/SeterusSnapShot(7468): wlclient init started
02-11 14:25:44.082: D/SeterusSnapShot(7468): Read cookies: null
02-11 14:25:44.082: D/SeterusSnapShot(7468): CookieMgr read cookies: {}
02-11 14:25:44.132: W/SeterusSnapShot(7468): Your application is using the WL.OptionsMenu API. Note that, if your application targets Android 3.0 (API level 11) or higher, WL.OptionsMenu might have no effect, depending on the device.
02-11 14:25:44.152: D/SeterusSnapShot(7468): addDeviceIDHeader deviceIDSuccessCallback
02-11 14:25:44.152: D/SeterusSnapShot(7468): connectOnStartup finalizeInit
02-11 14:25:44.152: D/SeterusSnapShot(7468): before: app init onSuccess
02-11 14:25:44.172: D/WLDroidGap(7468): unregisterReceivers:Receiver not registered: null
02-11 14:25:44.172: D/WLDroidGap(7468): unregisterReceivers:Receiver not registered: null
02-11 14:25:44.172: D/SeterusSnapShot(7468): after: app init onSuccess
02-11 14:25:44.182: D/SeterusSnapShot(7468): added onPause event handler
02-11 14:25:44.182: D/SeterusSnapShot(7468): wlclient init success
02-11 14:29:18.792: D/CordovaWebView(7468): The current URL is: file:///data/data/com.SeterusSnapShot/files/www/default/index.html
02-11 14:29:18.792: D/CordovaWebView(7468): The URL at item 0 is:file:///data/data/com.SeterusSnapShot/files/www/default/index.html
02-11 14:29:18.952: D/CordovaActivity(7468): Paused the application!
02-11 14:29:18.952: D/CordovaWebView(7468): Handle the pause
02-11 14:29:18.952: D/SeterusSnapShot(7468): Flush called
02-11 14:29:19.602: D/CordovaActivity(7468): CordovaActivity.onDestroy()
02-11 14:29:19.632: D/CordovaWebView(7468): >>> loadUrlNow()
02-11 14:29:19.662: D/WLDroidGap(7468): unregisterReceivers:Receiver not registered: null
02-11 14:29:19.682: I/AndroidRuntime(7468): VM exiting with result code 0, cleanup skipped.
02-11 14:46:48.742: I/CordovaLog(7902): Changing log level to DEBUG(3)
02-11 14:46:48.742: D/CordovaActivity(7902): CordovaActivity.onCreate()
02-11 14:46:48.782: D/dalvikvm(7902): GC_FOR_ALLOC freed 59K, 2% free 7778K/7904K, paused 17ms, total 17ms
02-11 14:46:48.782: I/dalvikvm-heap(7902): Grow heap (frag case) to 8.107MB for 474560-byte allocation
02-11 14:46:48.812: D/dalvikvm(7902): GC_FOR_ALLOC freed 1K, 2% free 8241K/8368K, paused 24ms, total 24ms
02-11 14:46:48.892: D/CordovaWebView(7902): CordovaWebView is running on device made by: asus
02-11 14:46:48.902: D/JsMessageQueue(7902): Set native->JS mode to 2
02-11 14:46:48.912: D/CordovaActivity(7902): CordovaActivity.init()
02-11 14:46:48.922: W/com.worklight.androidgap.analytics.WLAnalytics(7902): TLF_configurator.enable was called, but the required Tealeaf libraries are not present in the classpath.
02-11 14:46:48.932: D/WLDroidGap(7902): New installation/upgrade detected, copying resources and saving new checksum
02-11 14:46:48.932: D/Whitelist(7902): Unlimited access to network resources
02-11 14:46:48.942: I/CordovaLog(7902): Changing log level to DEBUG(3)
02-11 14:46:48.942: D/CordovaActivity(7902): Resuming the App
02-11 14:46:48.942: D/CordovaActivity(7902): CB-3064: The errorUrl is null
02-11 14:46:48.982: D/WLDroidGap(7902): Started copying files to local storage...
02-11 14:46:48.982: D/libEGL(7902): loaded /system/lib/egl/libEGL_tegra.so
02-11 14:46:49.002: D/libEGL(7902): loaded /system/lib/egl/libGLESv1_CM_tegra.so
02-11 14:46:49.022: D/libEGL(7902): loaded /system/lib/egl/libGLESv2_tegra.so
02-11 14:46:49.042: D/OpenGLRenderer(7902): Enabling debug mode 0
02-11 14:46:49.052: D/SoftKeyboardDetect(7902): Ignore this event
02-11 14:46:49.152: D/SoftKeyboardDetect(7902): Ignore this event
02-11 14:46:49.172: D/dalvikvm(7902): GC_FOR_ALLOC freed 599K, 8% free 8145K/8808K, paused 16ms, total 16ms
02-11 14:46:49.722: D/dalvikvm(7902): GC_FOR_ALLOC freed 436K, 8% free 8155K/8808K, paused 14ms, total 14ms
02-11 14:46:49.942: D/dalvikvm(7902): GC_FOR_ALLOC freed 439K, 8% free 8163K/8808K, paused 14ms, total 14ms
02-11 14:46:50.282: D/dalvikvm(7902): GC_FOR_ALLOC freed 457K, 8% free 8163K/8808K, paused 18ms, total 18ms
02-11 14:46:50.502: D/dalvikvm(7902): GC_FOR_ALLOC freed 454K, 8% free 8158K/8808K, paused 14ms, total 14ms
02-11 14:46:50.832: D/dalvikvm(7902): GC_FOR_ALLOC freed 451K, 8% free 8163K/8808K, paused 14ms, total 14ms
02-11 14:46:51.172: D/dalvikvm(7902): GC_FOR_ALLOC freed 459K, 8% free 8164K/8808K, paused 13ms, total 13ms
02-11 14:46:51.382: D/dalvikvm(7902): GC_FOR_ALLOC freed 453K, 8% free 8157K/8808K, paused 13ms, total 13ms
02-11 14:46:51.532: D/dalvikvm(7902): GC_FOR_ALLOC freed 445K, 8% free 8163K/8808K, paused 14ms, total 14ms
02-11 14:46:52.992: D/dalvikvm(7902): GC_FOR_ALLOC freed 483K, 8% free 8156K/8808K, paused 13ms, total 13ms
02-11 14:46:54.512: D/dalvikvm(7902): GC_FOR_ALLOC freed 493K, 8% free 8157K/8808K, paused 15ms, total 15ms
02-11 14:46:54.892: D/WLDroidGap(7902): Finished copying files to local storage...
02-11 14:46:54.902: D/WLDroidGap(7902): no need to check web resource integrity
02-11 14:46:54.932: D/CordovaWebView(7902): >>> loadUrl(file:///data/data/com.SeterusSnapShot/files/www/skinLoader.html)
02-11 14:46:54.932: D/PluginManager(7902): init()
02-11 14:46:54.932: D/CordovaWebView(7902): >>> loadUrlNow()
02-11 14:46:55.162: D/CordovaActivity(7902): onMessage(onPageStarted,file:///data/data/com.SeterusSnapShot/files/www/skinLoader.html)
02-11 14:46:55.272: D/chromium(7902): Unknown chromium error: -6
02-11 14:46:55.282: D/CordovaWebViewClient(7902): onPageFinished(file:///data/data/com.SeterusSnapShot/files/www/skinLoader.html)
02-11 14:46:55.282: D/CordovaActivity(7902): onMessage(onPageFinished,file:///data/data/com.SeterusSnapShot/files/www/skinLoader.html)
02-11 14:46:55.472: D/CordovaActivity(7902): onMessage(spinner,stop)
02-11 14:46:55.482: D/CordovaNetworkManager(7902): Connection Type: wifi
02-11 14:46:55.502: D/TilesManager(7902): Starting TG #0, 0x64374730
02-11 14:46:55.502: D/TilesManager(7902): new EGLContext from framework: 59fa6e60
02-11 14:46:55.502: D/GLWebViewState(7902): Reinit shader
02-11 14:46:55.572: D/GLWebViewState(7902): Reinit transferQueue
02-11 14:46:55.572: D/CordovaNetworkManager(7902): Connection Type: wifi
02-11 14:46:55.582: D/CordovaActivity(7902): onMessage(networkconnection,wifi)
02-11 14:46:55.582: D/CordovaWebView(7902): >>> loadUrl(file:///data/data/com.SeterusSnapShot/files/www/default/index.html)
02-11 14:46:55.582: D/PluginManager(7902): init()
02-11 14:46:55.582: D/CordovaWebView(7902): >>> loadUrlNow()
02-11 14:46:55.582: D/CordovaActivity(7902): onMessage(onPageStarted,file:///data/data/com.SeterusSnapShot/files/www/default/index.html)
02-11 14:46:56.522: D/CordovaActivity(7902): onMessage(spinner,stop)
02-11 14:46:56.532: D/CordovaNetworkManager(7902): Connection Type: wifi
02-11 14:46:56.532: D/CordovaActivity(7902): onMessage(networkconnection,wifi)
02-11 14:46:56.532: D/CordovaNetworkManager(7902): Connection Type: wifi
02-11 14:46:56.722: D/CordovaLog(7902): file:///data/data/com.SeterusSnapShot/files/www/default/js/snapShotView.js: Line 18 : XXXXXXXXXXX Entering snapShotList() to setup loan info data.::null
02-11 14:46:56.722: I/Web Console(7902): XXXXXXXXXXX Entering snapShotList() to setup loan info data.::null at file:///data/data/com.SeterusSnapShot/files/www/default/js/snapShotView.js:18
02-11 14:46:56.722: D/CordovaLog(7902): file:///data/data/com.SeterusSnapShot/files/www/default/js/snapShotView.js: Line 31 : XXXXXXXXXXX Appears Local Storage is not setup:: loanNumnber tag does not exist.
02-11 14:46:56.722: I/Web Console(7902): XXXXXXXXXXX Appears Local Storage is not setup:: loanNumnber tag does not exist. at file:///data/data/com.SeterusSnapShot/files/www/default/js/snapShotView.js:31
02-11 14:46:56.732: D/CordovaLog(7902): file:///data/data/com.SeterusSnapShot/files/www/default/js/snapShotView.js: Line 33 : XXXXXXXXXXX Get just created data.::1234567890
02-11 14:46:56.732: I/Web Console(7902): XXXXXXXXXXX Get just created data.::1234567890 at file:///data/data/com.SeterusSnapShot/files/www/default/js/snapShotView.js:33
02-11 14:46:56.732: D/CordovaLog(7902): file:///data/data/com.SeterusSnapShot/files/www/default/js/snapShotView.js: Line 46 : XXXXXXXXXXX Build, or refresh the loan list information
02-11 14:46:56.732: I/Web Console(7902): XXXXXXXXXXX Build, or refresh the loan list information at file:///data/data/com.SeterusSnapShot/files/www/default/js/snapShotView.js:46
02-11 14:46:56.902: D/CordovaWebViewClient(7902): onPageFinished(file:///data/data/com.SeterusSnapShot/files/www/default/index.html)
02-11 14:46:56.902: D/CordovaActivity(7902): onMessage(onPageFinished,file:///data/data/com.SeterusSnapShot/files/www/default/index.html)
02-11 14:46:57.022: D/chromium(7902): Unknown chromium error: -6
02-11 14:46:57.022: D/chromium(7902): Unknown chromium error: -6
02-11 14:46:57.022: D/chromium(7902): Unknown chromium error: -6
02-11 14:46:57.052: D/CordovaLog(7902): file:///data/data/com.SeterusSnapShot/files/www/default/dojo/dojo.js: Line 21 : Error: scriptError
02-11 14:46:57.052: E/Web Console(7902): Error: scriptError at file:///data/data/com.SeterusSnapShot/files/www/default/dojo/dojo.js:21
02-11 14:46:57.052: D/CordovaLog(7902): file:///data/data/com.SeterusSnapShot/files/www/default/dojo/dojo.js: Line 21 : Error: scriptError
02-11 14:46:57.052: E/Web Console(7902): Error: scriptError at file:///data/data/com.SeterusSnapShot/files/www/default/dojo/dojo.js:21
02-11 14:46:57.132: D/CordovaLog(7902): file:///data/data/com.SeterusSnapShot/files/www/default/dojo/dojo.js: Line 21 : Error: scriptError
02-11 14:46:57.132: E/Web Console(7902): Error: scriptError at file:///data/data/com.SeterusSnapShot/files/www/default/dojo/dojo.js:21
02-11 14:46:57.162: D/chromium(7902): Unknown chromium error: -6
02-11 14:46:57.162: D/chromium(7902): Unknown chromium error: -6
02-11 14:46:57.222: D/CordovaLog(7902): file:///data/data/com.SeterusSnapShot/files/www/default/dojo/dojo.js: Line 21 : Error: scriptError
02-11 14:46:57.222: E/Web Console(7902): Error: scriptError at file:///data/data/com.SeterusSnapShot/files/www/default/dojo/dojo.js:21
02-11 14:46:57.222: D/CordovaLog(7902): file:///data/data/com.SeterusSnapShot/files/www/default/dojo/dojo.js: Line 21 : Error: scriptError
02-11 14:46:57.222: E/Web Console(7902): Error: scriptError at file:///data/data/com.SeterusSnapShot/files/www/default/dojo/dojo.js:21
02-11 14:46:57.272: D/dalvikvm(7902): GC_FOR_ALLOC freed 481K, 8% free 8187K/8808K, paused 15ms, total 16ms
02-11 14:46:57.272: W/PluginManager(7902): THREAD WARNING: exec() call to Utils.getScreenSize blocked the main thread for 17ms. Plugin should use CordovaInterface.getThreadPool().
02-11 14:46:57.282: D/CordovaActivity(7902): onMessage(spinner,stop)
02-11 14:46:57.282: D/SeterusSnapShot(7902): wlclient init started
02-11 14:46:57.282: D/SeterusSnapShot(7902): Read cookies: null
02-11 14:46:57.282: D/SeterusSnapShot(7902): CookieMgr read cookies: {}
02-11 14:46:57.322: W/SeterusSnapShot(7902): Your application is using the WL.OptionsMenu API. Note that, if your application targets Android 3.0 (API level 11) or higher, WL.OptionsMenu might have no effect, depending on the device.
02-11 14:46:57.332: D/SeterusSnapShot(7902): addDeviceIDHeader deviceIDSuccessCallback
02-11 14:46:57.352: W/PluginManager(7902): THREAD WARNING: exec() call to Utils.writePref blocked the main thread for 22ms. Plugin should use CordovaInterface.getThreadPool().
02-11 14:46:57.352: D/SeterusSnapShot(7902): connectOnStartup finalizeInit
02-11 14:46:57.362: D/SeterusSnapShot(7902): before: app init onSuccess
02-11 14:46:57.372: D/WLDroidGap(7902): unregisterReceivers:Receiver not registered: null
02-11 14:46:57.372: D/WLDroidGap(7902): unregisterReceivers:Receiver not registered: null
02-11 14:46:57.382: D/SeterusSnapShot(7902): after: app init onSuccess
02-11 14:46:57.382: D/SeterusSnapShot(7902): added onPause event handler
02-11 14:46:57.382: D/SeterusSnapShot(7902): wlclient init success