Work Light 6.1 Android 应用程序渲染所有视图,无需小部件

2023-12-26

我使用 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

Worklight 6.1 使用 Dojo v1.9.1-20130926,而不是 v1.8。
您可以在将 Dojo 添加到 Worklight 项目时为您创建的 dojoLib 中验证这一点。有一个version.txt 文件。

LogCat 中有一个相关错误:scriptError dojo.js:21
过去最相关的问题:

  • Worklight core-web-layer.js 错误 https://stackoverflow.com/questions/17546952/worklight-core-web-layer-js-errors
  • IBM Worklight 6.0 - 无法在 avd 上使用适用于 Android 环境的 dojo 工具包运行示例混合 Worklight 应用程序? https://stackoverflow.com/questions/17543927/ibm-worklight-6-0-unable-to-run-sample-hybrid-worklight-app-using-dojo-toolkit

我不知道 1.8 是否是一个拼写错误,但我建议按照下面的示例重新开始一个新的 Worklight 项目。如果现在有效,我建议从那里继续。


这就是我所做的。如果您正在做其他具体事情,请告诉我:

  1. 创建了一个新的 Worklight 项目和应用程序;使用向导添加 Dojo 库
  2. 添加了 iPhone 环境(虽然您已添加 Android,但这不是特定于环境的)
  3. 添加了以下 Dojo 小部件:标题、按钮、文本框、滑块、轮播、CarouselItem...

    在common\js\main.js中,dojoInit()会自动更新所需的模块require功能:

    function dojoInit() {
      require([ "dojo/ready", "dojo/parser", "dojox/mobile", "dojo/dom", 
      "dijit/registry", "dojox/mobile/ScrollableView",
      "dojox/mobile/Button", "dojox/mobile/Heading", "dojox/mobile/TextBox",   
      "dojox/mobile/Carousel", "dojox/mobile/CarouselItem", "dojox/mobile/SearchBox", 
      "dojox/mobile/Slider"], >
    
     function(ready) {
          ready(function() {
          });
      });
    }
    
  4. 运行方式 > 在 Worklight 开发服务器上运行
  5. 在 Worklight Console 的 MBS 中预览
  6. 在 Xcode 中打开
  7. 在 iOS 模拟器和/或设备上运行

在 MBS 和模拟器/设备中,我看到了相同的内容:

MBS:
enter image description here

iOS Simulator/device:
enter image description here

现在如果我去Dojo Library Requests查看并取消选中Provide Missing Dojo Resources并在 Xcode 中重新运行,图形将不会加载。如果我重新检查该选项并在 Xcode 中重新运行,图形就会再次加载。

Missing graphics:
enter image description here

为了纠正这个问题,我需要在 Eclipse 中重新构建项目。
Why?

构建时使用Provide Missing Dojo Resources检查后,您将在生成的 HTML 的 HEAD 中找到以下内容:<script data-dojo-config="isDebug: false, async: true, parseOnLoad: true, mblHideAddressBar: false" src=http://some-ip-address-and-path/dojo/dojo.js" type="text/javascript"></script>

This srcURL 告诉应用程序从服务器中的dojoLib 库获取所有Dojo 资源。
取消勾选时Provide Missing Dojo Resources并在 Eclipse 中重新构建项目,src网址更改为dojo/dojo.js,这意味着所有资源都将从应用程序内的 Dojo 库中包含的任何资源中获取。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Work Light 6.1 Android 应用程序渲染所有视图,无需小部件 的相关文章

  • Android 中所有活动的单套接字 IO 连接

    我已经为 SocketIOClient 参考创建了 Singleton 类here https stackoverflow com questions 13709783 android socket io switch activities
  • 使用 android 将图像上传到 Flickr

    我需要将 Flickr 与 android 集成 我已完成身份验证 我需要将图像上传到 flickr 但我不知道如何执行相同操作 我参考文件 http www flickr com services api upload api html
  • 如何检测手机一整圈(360 度)?

    由于我在网络上搜索没有找到任何相关答案 因此我发布了有关检测的问题360度转弯使用加速度计绕其轴的 Android 设备 例如 在横向模式下围绕 y 轴 假设在起始位置 y 值为 0 设备平坦于地面 当手机向前旋转 90 度时y 10 18
  • Context.startForegroundService 然后没有调用Service.startForeground

    这是我的 BroadcastReciever 类 该类处理启动电话状态 Code public class BroadCastRecieverBoot extends BroadcastReceiver Override public vo
  • Android Studio 模拟器无法加载 Windows 10

    我在 Windows 10 上全新安装了 android studio 其中包含 android api 22 的所有软件包 当我运行模拟器时 我收到以下消息 C Users admin AppData Local Android sdk
  • 将 React Native 应用程序嵌入到现有的 ios/android 应用程序中

    我需要知道是否可以在现有的 ios android 应用程序中 嵌入 一个 React Native 应用程序 而不共享 React Native 应用程序代码 我们目前有一个 React Native 应用程序 它使用一些插件依赖项 并被
  • 使用 ViewPager 从 Activity 到 Fragment 的通信

    我有一个 Activity 和两个 Fragmentstablayout含有一个viewpager 现在我可以通过实现谷歌的指南回调接口从片段到活动进行通信 但我怎样才能以另一种方式沟通从活动到片段 如果活动中发生了一些事情 外部事件 我想
  • SDK 管理器缺少模拟器的旧版 Android 系统映像

    我刚刚重新安装了 ADT 捆绑包 20130522 和 Android Studio 因为我的 eclipse 安装再次搞砸了 但那是另一个故事了 在任一版本中 当我启动 SDK Manager 时 都没有任何 2 2 的系统映像 只有 2
  • Android 套接字和 HTTP 响应标头

    有趣的是 我可能无意中找到了解决方案是否可以使用普通套接字连接发送 HTTP 请求并接收没有标头的响应 https stackoverflow com questions 8320574 我希望我忽略了一些东西 无论如何 我正在连接到 We
  • 为什么Android room不建议使用allowMainThreadQueries()?

    我正在创建一个小型应用程序 仅在数据库中保存一些计数器 如果不存在 请插入一个 如果是的话 增加更新 该应用程序没有任何用户界面 它是一个保存和读取数据 少量表 少量记录 的插件 我可以用吗允许主线程查询 在这种情况下 每次我读到一些关于这
  • openFileOutput 在单例类中无法正常工作 - 想法/解决方法?

    作为一名 Android 开发新手 我遇到了一些奇怪的问题 我想创建一个类 它方法其他类 活动 任何可以用于以某种特殊方式处理文件的类 假设为了简单起见 我们将记录一些内容 如果我在活动中执行以下操作 例如在 OnClick 侦听器中 则一
  • 彩信数据总是错误

    我正在从 Galaxy S6 读取短信和彩信数据 所有 SMS 消息都有一个date像这样的字段1456252633000 该数字是 unix 时间戳 1000 我发送 未收到 的彩信具有如下日期字段 1440628863时间戳是正确的 u
  • Android TextView 中的等宽表格数字

    我有一个自定义字体 默认情况下具有可变宽度数字字形 并且我想在 Android 中使用该字体的等宽表格数字功能TextView使数字垂直对齐 也就是说 改变如下 像这样的事情 要选择字体的表格数字功能 请使用TextView s fontF
  • 标签栏随键盘一起上升

    这个问题之前已经发过 但是没有答案 Problem TabBar gt 2 个选项卡 选项卡一有一个Scrollview and an EddiText 标签二 其他 贴带时EditText 软键盘上升 TabBar与它一起 一个丑陋的解决
  • 布局聊天气泡问题:TextView 占满整个屏幕

    我正在研究泡泡聊天 我使用具有两种布局的适配器 一种用于传入消息 另一种用于我的消息 适配器工作正常 我的问题在于传入布局 无法很好地显示传入时间文本 当消息文本增长时 会填满屏幕的整个宽度 并隐藏消息时间的文本 第一个问题 如何才能实现这
  • 获取接收者的设备令牌以在 Firebase 中发送通知

    所以我正在学习如何使用 firebase 发送设备到设备的通知 我看到了这个answer https stackoverflow com a 42548586 5237289发送通知 看起来很简单 现在 我知道要获取发件人的令牌 它应该如下
  • 什么是版本代码主要?和versionCode有什么区别?

    我刚刚发现PackageInfo versionCode https developer android com reference android content pm PackageInfo html versionCode在 Andr
  • 如何将 Android 应用程序添加到已在 iOS 应用程序中使用的现有 Firebase 项目?

    我一直在我的 iOS 应用程序中使用 Firebase 项目 我现在想开始为 Android 应用程序使用相同的 Firebase 项目及其所有数据库和存储 在您的应用程序下Overview菜单 你应该按添加另一个应用程序并选择Androi
  • 突出显示菜单抽屉/滑动菜单中的所选项目

    使用的库 https github com SimonVT android menudrawer https github com SimonVT android menudrawer https github com JakeWharto
  • 如何像UCBrowser一样使用webview打开url

    我是安卓新手 我正在尝试制作一个示例应用程序来在 webview 中打开网站 问题是 网站以桌面模式打开 如何才能像UC浏览器 手机模式 一样打开网站 尝试这个 它应该有效 webview1 getSettings setJavaScrip

随机推荐