IBM Worklight 6.1-如果启用Android屏幕兼容性模式,API方法将失败

IBM Worklight 6.1-如果启用Android屏幕兼容性模式,API方法将失败,android,cordova,ibm-mobilefirst,Android,Cordova,Ibm Mobilefirst,在AndroidManifest.xml中启用了by change supports screens标记后,许多Worklight和Cordova API方法将不再有效 比如说, 当直接更新时,按下更新按钮后不会发生任何事情 在中,回调将不起作用 在navigator.camera.getPicture中,选择图片后将被卡住 如果我禁用屏幕兼容模式,一切都会恢复正常 上述情况仅在Worklight 6.1(使用Cordova 3.1)中发生;在Worklight 6.0(使用Cordova

在AndroidManifest.xml中启用了by change supports screens标记后,许多Worklight和Cordova API方法将不再有效

比如说,

  • 当直接更新时,按下更新按钮后不会发生任何事情
  • 在中,回调将不起作用
  • 在navigator.camera.getPicture中,选择图片后将被卡住
如果我禁用屏幕兼容模式,一切都会恢复正常

上述情况仅在Worklight 6.1(使用Cordova 3.1)中发生;在Worklight 6.0(使用Cordova 2.6)中,一切正常

有人提出解决方案吗

更新: 我创建了一个新项目,并尝试在屏幕兼容模式下直接从Worklight server进行更新。 这是我按下更新按钮后logcat的日志

05-07 02:46:37.670: I/CordovaLog(2172): Changing log level to DEBUG(3)
05-07 02:46:37.670: D/CordovaActivity(2172): CordovaActivity.onCreate()
05-07 02:46:37.790: D/dalvikvm(2172): GC_FOR_ALLOC freed 295K, 17% free 2602K/3128K, paused 12ms, total 14ms
05-07 02:46:37.790: I/dalvikvm-heap(2172): Grow heap (frag case) to 3.020MB for 268012-byte allocation
05-07 02:46:37.810: D/dalvikvm(2172): GC_FOR_ALLOC freed <1K, 16% free 2863K/3392K, paused 15ms, total 16ms
05-07 02:46:38.000: D/dalvikvm(2172): GC_FOR_ALLOC freed 199K, 15% free 2915K/3392K, paused 17ms, total 18ms
05-07 02:46:38.010: I/dalvikvm-heap(2172): Grow heap (frag case) to 3.338MB for 281892-byte allocation
05-07 02:46:38.040: D/dalvikvm(2172): GC_FOR_ALLOC freed <1K, 14% free 3190K/3668K, paused 32ms, total 32ms
05-07 02:46:38.250: D/CordovaWebView(2172): CordovaWebView is running on device made by: unknown
05-07 02:46:38.280: D/JsMessageQueue(2172): Set native->JS mode to 2
05-07 02:46:38.320: D/CordovaActivity(2172): CordovaActivity.init()
05-07 02:46:38.380: W/com.worklight.androidgap.analytics.WLAnalytics(2172): TLF_configurator.enable was called, but the required Tealeaf libraries are not present in the classpath.
05-07 02:46:38.450: D/Whitelist(2172): Unlimited access to network resources
05-07 02:46:38.450: I/CordovaLog(2172): Changing log level to DEBUG(3)
05-07 02:46:38.450: D/CordovaActivity(2172): Resuming the App
05-07 02:46:38.450: D/CordovaActivity(2172): CB-3064: The errorUrl is null
05-07 02:46:38.500: I/Choreographer(2172): Skipped 34 frames!  The application may be doing too much work on its main thread.
05-07 02:46:38.690: D/SoftKeyboardDetect(2172): Ignore this event
05-07 02:46:38.750: D/WLDroidGap(2172): no need to check web resource integrity
05-07 02:46:38.950: D/(2172): HostConnection::get() New Host Connection established 0xb9142ce0, tid 2172
05-07 02:46:39.320: D/CordovaWebView(2172): >>> loadUrl(file:///android_asset/www/default/index.html)
05-07 02:46:39.320: D/PluginManager(2172): init()
05-07 02:46:39.330: D/CordovaWebView(2172): >>> loadUrlNow()
05-07 02:46:39.710: D/CordovaActivity(2172): onMessage(onPageStarted,file:///android_asset/www/default/index.html)
05-07 02:46:39.850: D/dalvikvm(2172): GC_FOR_ALLOC freed 249K, 15% free 3360K/3924K, paused 14ms, total 15ms
05-07 02:46:40.380: D/dalvikvm(2172): GREF has increased to 201
05-07 02:46:40.410: D/dalvikvm(2172): GC_FOR_ALLOC freed 283K, 16% free 3472K/4104K, paused 15ms, total 17ms
05-07 02:46:40.450: D/dalvikvm(2172): GC_FOR_ALLOC freed 9K, 10% free 3815K/4212K, paused 20ms, total 21ms
05-07 02:46:40.550: D/dalvikvm(2172): GC_FOR_ALLOC freed 15K, 9% free 4137K/4536K, paused 31ms, total 33ms
05-07 02:46:40.660: D/dalvikvm(2172): GC_FOR_ALLOC freed 171K, 12% free 4356K/4896K, paused 14ms, total 15ms
05-07 02:46:40.780: D/dalvikvm(2172): GC_FOR_ALLOC freed 388K, 15% free 4449K/5220K, paused 14ms, total 15ms
05-07 02:46:40.990: D/CordovaWebViewClient(2172): onPageFinished(file:///android_asset/www/default/index.html)
05-07 02:46:40.990: D/CordovaActivity(2172): onMessage(onPageFinished,file:///android_asset/www/default/index.html)
05-07 02:46:41.100: D/CordovaActivity(2172): onMessage(spinner,stop)
05-07 02:46:41.240: D/CordovaNetworkManager(2172): Connection Type: 3g
05-07 02:46:41.240: W/PluginManager(2172): THREAD WARNING: exec() call to NetworkStatus.getConnectionInfo blocked the main thread for 23ms. Plugin should use CordovaInterface.getThreadPool().
05-07 02:46:41.300: D/TilesManager(2172): Starting TG #0, 0xb91c3520
05-07 02:46:41.410: D/CordovaNetworkManager(2172): Connection Type: 3g
05-07 02:46:41.430: D/CordovaActivity(2172): onMessage(networkconnection,3g)
05-07 02:46:41.630: W/PluginManager(2172): THREAD WARNING: exec() call to DeviceAuth.getDeviceUUID blocked the main thread for 51ms. Plugin should use CordovaInterface.getThreadPool().
05-07 02:46:41.860: I/wl.client(2172): WL.Client.init ENTERING
05-07 02:46:41.860: D/NONE(2172): ondeviceready event dispatched
05-07 02:46:41.880: I/wl.client(2172): WL.Client onEnvInit ENTERING
05-07 02:46:41.900: W/PluginManager(2172): THREAD WARNING: exec() call to NetworkDetector.setNativeOptions blocked the main thread for 55ms. Plugin should use CordovaInterface.getThreadPool().
05-07 02:46:41.910: D/NONE(2172): wlclient init started
05-07 02:46:41.930: W/PluginManager(2172): THREAD WARNING: exec() call to NetworkDetector.log blocked the main thread for 21ms. Plugin should use CordovaInterface.getThreadPool().
05-07 02:46:41.950: D/NONE(2172): Read cookies: null
05-07 02:46:41.980: D/NONE(2172): CookieMgr read cookies: {}
05-07 02:46:42.010: W/NONE(2172): 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.
05-07 02:46:42.040: D/NONE(2172): addDeviceIDHeader deviceIDSuccessCallback
05-07 02:46:42.120: D/NONE(2172): connectOnStartup
05-07 02:46:42.140: D/NONE(2172): connectOnStartup isCertificateExists:  false
05-07 02:46:42.140: D/NONE(2172): Request [http://worklightserver:9080/worklight/apps/services/api/resizeTest/android/init]
05-07 02:46:42.500: W/PluginManager(2172): THREAD WARNING: exec() call to Utils.writePref blocked the main thread for 72ms. Plugin should use CordovaInterface.getThreadPool().
05-07 02:46:42.650: D/NONE(2172): Request [http://worklightserver:9080/worklight/apps/services/api/resizeTest/android/init]
05-07 02:46:42.650: W/PluginManager(2172): THREAD WARNING: exec() call to NetworkDetector.log blocked the main thread for 38ms. Plugin should use CordovaInterface.getThreadPool().
05-07 02:46:43.300: D/CordovaActivity(2172): onMessage(spinner,stop)
05-07 02:46:43.420: D/dalvikvm(2172): GC_FOR_ALLOC freed 1685K, 36% free 3422K/5340K, paused 27ms, total 38ms
05-07 02:46:43.430: W/PluginManager(2172): THREAD WARNING: exec() call to NetworkDetector.log blocked the main thread for 135ms. Plugin should use CordovaInterface.getThreadPool().
05-07 02:46:43.450: D/NONE(2172): response [http://worklightserver:9080/worklight/apps/services/api/resizeTest/android/init] success: /*-secure-
05-07 02:46:43.450: D/NONE(2172): {"WL-Authentication-Success":{"wl_remoteDisableRealm":{"userId":"null","attributes":{},"isUserAuthenticated":1,"displayName":"null"},"wl_antiXSRFRealm":{"userId":"j9dne6vt6sf2t0bgresgv1bkfo","attributes":{},"isUserAuthenticated":1,"displayName":"j9dne6vt6sf2t0bgresgv1bkfo"},"wl_deviceNoProvisioningRealm":{"userId":"1e1d4692-dcdd-32e9-883e-5ddd4a4e6ff9","attributes":{"mobileClientData":"com.worklight.core.auth.ext.MobileClientData@685f0a"},"isUserAuthenticated":1,"displayName":"1e1d4692-dcdd-32e9-883e-5ddd4a4e6ff9"},"wl_anonymousUserRealm":{"userId":"2250519e-a491-41fa-91c5-f49a6e3a87d0","attributes":{},"isUserAuthenticated":1,"displayName":"2250519e-a491-41fa-91c5-f49a6e3a87d0"}},"userPrefs":{},"gadgetProps":{"directUpdate":{"updateUnpackedSize":1197037,"availableSkins":["default"],"checksum":1927153879,"updateSize":387359},"ENVIRONMENT":"android"},"userInfo":{"SubscribeServlet":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null},"wl_authenticityRealm":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null},"SampleAppRealm":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null},"wl_remoteDisableRealm":{"userId":"null","attributes":{},"isUserAuthenticated":1,"displayName":"null"},"PushAppRealm":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null},"wl_antiXSRFRealm":{"userId":"j9dne6vt6sf2t0bgresgv1bkfo","attributes":{},"isUserAuthenticated":1,"displayName":"j9dne6vt6sf2t0bgresgv1bkfo"},"WorklightConsole":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null},"wl_deviceAutoProvisioningRealm":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null},"wl_deviceNoProvisioningRealm":{"userId":"1e1d4692-dcdd-32e9-883e-5ddd4a4e6ff9","attributes":{"mobileClientData":"com.worklight.core.auth.ext.MobileClientData@685f0a"},"isUserAuthenticated":1,"displayName":"1e1d4692-dcdd-32e9-883e-5ddd4a4e6ff9"},"myserver":{"userId":"2250519e-a491-41fa-91c5-f49a6e3a87d0","attributes":{},"isUserAuthenticated":1,"displayName":"2250519e-a491-41fa-91c5-f49a6e3a87d0"},"wl_anonymousUserRealm":{"userId":"2250519e-a491-41fa-91c5-f49a6e3a87d0","attributes":{},"isUserAuthenticated":1,"displayName":"2250519e-a491-41fa-91c5-f49a6e3a87d0"}}}*/
05-07 02:46:43.510: I/wl.client(2172): WL.Client.connect onConnectSuccess ENTERING
05-07 02:46:43.510: D/NONE(2172): wlclient connect success
05-07 02:46:37.670:I/CordovaLog(2172):将日志级别更改为调试(3)
5-07 02:46:37.670:D/CordovaActivity(2172):CordovaActivity.onCreate()
05-07 02:46:37.790:D/dalvikvm(2172):释放295K的所有物质的GC_,17%释放2602K/3128K,暂停12毫秒,总计14毫秒
05-07 02:46:37.790:I/dalvikvm堆(2172):为268012字节分配将堆(frag案例)增长到3.020MB
05-07 02:46:37.810:D/dalvikvm(2172):GC_FOR_ALLOC freed>>加载URL(file:///android_asset/www/default/index.html)
05-07 02:46:39.320:D/PluginManager(2172):init()
05-07 02:46:39.330:D/CordovaWebView(2172):>>>loadUrlNow()
5-07 02:46:39.710:D/CordovaActivity(2172):onMessage(onPageStarted,file:///android_asset/www/default/index.html)
05-07 02:46:39.850:D/dalvikvm(2172):释放249K的所有元素的GC_,15%的自由元素3360K/3924K,暂停14ms,总计15ms
达尔维克姆(2172):格雷夫已增至201
05-07 02:46:40.410:D/dalvikvm(2172):释放283K的所有组件的GC_,16%的释放3472K/4104K,暂停15ms,总计17ms
05-07 02:46:40.450:D/dalvikvm(2172):释放9K的所有物质的GC,释放10%的3815K/4212K,暂停20ms,总计21ms
05-07 02:46:40.550:D/dalvikvm(2172):释放15K的所有物质的GC_,9%释放4137K/4536K,暂停31ms,总计33ms
05-07 02:46:40.660:D/dalvikvm(2172):释放171K的所有元素的GC_,12%的自由元素4356K/4896K,暂停14ms,总计15ms
05-07 02:46:40.780:D/dalvikvm(2172):释放388K的所有元素的GC_,15%的自由元素4449K/5220K,暂停14ms,总计15ms
05-07 02:46:40.990:D/CordovaWebViewClient(2172):第页完成(file:///android_asset/www/default/index.html)
05-07 02:46:40.990:D/cordova活动(2172):onMessage(onPageFinished,file:///android_asset/www/default/index.html)
05-07 02:46:41.100:D/cordova活动(2172):onMessage(旋转器,停止)
05-07 02:46:41.240:D/CordovaNetworkManager(2172):连接类型:3g
05-07 02:46:41.240:W/PluginManager(2172):线程警告:对NetworkStatus.getConnectionInfo的exec()调用已将主线程阻塞23毫秒。插件应使用CordovaInterface.getThreadPool()。
05-07 02:46:41.300:D/TileManager(2172):启动TG#0,0xb91c3520
05-07 02:46:41.410:D/CordovaNetworkManager(2172):连接类型:3g
05-07 02:46:41.430:D/CordovaActivity(2172):onMessage(网络连接,3g)
05-07 02:46:41.630:W/PluginManager(2172):线程警告:对DeviceAuth.getDeviceUUID的exec()调用将主线程阻塞了51毫秒。插件应使用CordovaInterface.getThreadPool()。
05-07 02:46:41.860:I/wl.client(2172):wl.client.init正在输入
05-07 02:46:41.860:D/NONE(2172):ondeviceready事件已调度
05-07 02:46:41.880:I/wl.客户端(2172):wl.客户端正在输入
05-07 02:46:41.900:W/PluginManager(2172):线程警告:对NetworkDetector.setNativeOptions的exec()调用阻止了主线程55毫秒。插件应使用CordovaInterface.getThreadPool()。
05-07 02:46:41.910:D/NONE(2172):wlclient初始化已启动
05-07 02:46:41.930:W/PluginManager(2172):线程警告:对NetworkDetector.log的exec()调用将主线程阻塞了21毫秒。插件应使用CordovaInterface.getThreadPool()。
05-07 02:46:41.950:D/NONE(2172):读取cookies:null
05-07 02:46:41.980:D/NONE(2172):CookieMgr读取cookies:{}
05-07 02:46:42.010:W/NONE(2172):您的应用程序正在使用WL.options菜单API。请注意,如果您的应用程序针对Android 3.0(API级别11)或更高版本,则WL.options菜单可能无效,具体取决于设备。
05-07 02:46:42.040:D/NONE(2172):添加设备头设备成功回调
05-07 02:46:42.120:D/无(2172):接头启动
05-07 02:46:42.140:D/NONE(2172):连接启动isCertificateExists:false
05-07 02:46:42.140:D/无(2172):请求[http://worklightserver:9080/worklight/apps/services/api/resizeTest/android/init]
05-07 02:46:42.500:W/PluginManager(2172):线程警告:对Utils.writePref的exec()调用阻止了主线程72毫秒。插件应使用CordovaInterface.getThreadPool()。
05-07 02:46:42.650:D/无(2172):请求[http://worklightserver:9080/worklight/apps/services/api/resizeTest/android/init]
05-07 02:46:42.650:W/PluginManager(2172):线程警告:对NetworkDetector.log的exec()调用已将主线程阻塞38毫秒。插件应使用CordovaInterface.getThreadPool()。
05-07 02:46:43.300:D/cordova活动(2172):onMessage(旋转器,停止)
05-07 02:46:43.420:D/dalvikvm(2172):释放1685K的所有元素的GC_,36%的自由元素3422K/5340K,暂停27ms,总计38ms
05-07 02:46:43.430:W/PluginManager(2172):线程警告:对NetworkDetector.log的exec()调用已将主线程阻塞135ms。插件应使用CordovaInterface.getThreadPool()。
05-07 02:46:43.450:D/无(2172):应答[http://worklightserver:9080/worklight/apps/services/api/resizeTest/android/init]成功:/*-安全-
05-07 02:46:43.450:D/NONE(2172):{“WL身份验证成功”:{“WL_remoteDisableRealm”:{“userId”:“null”,“attributes”:{},“isUserAuthenticated”:1,“displayName”:“null”},“WL_antiXSRFRealm”:{“userId”:“J9DNE6VT6SF2T0BGRESGV1BFO”,“attributes”:{},“isUserAuthenticated”:1,“displayName”:“J9DNE6SF2T0BGRESGV1BFO”},“WL devisioningRealm”:{“userId”:“1e1d4692-dcdd-32e9-883e-5ddd4a4e6ff9”,“属性”:{“mobileClientData”:“com.worklight.core.auth.ext.M”