2013-03-27 133 views
0

我正在开发一个worklight应用程序。我为该项目生成了android环境...在android应用程序中,我能够看到背景上的主屏幕,但有一个很长时间的忙图标,并且我无法在任何地方点击主页面我在模拟器上运行应用程序。一段时间后,它说:“客户端初始化失败。连接到服务不可用”长时间不打开应用程序

我得到以下日志警告

Skipped 37 frames! The application may be doing too much work on its main thread.

我日志

SQLiteLog: (14) cannot open file at line 30176 of [00bb9c9ce4]

SQLiteLog: (14) os_unix.c:30176: (2) open(/CachedGeoposition.db) -

response [http://9.124.23.225:8080/apps/services/api/RQMLight/android/heartbeat] success:

在这些错误我在网址上收到以下消息:

/*-secure- {"WL-Authentication-Failure":{"wl_remoteDisableRealm":{"reason":"Login Failed"}}}*/

!日志here

我也收到错误

CordovaWebViewClient.onReceivedError: Error code=-6 Description=The connection to the server was unsuccessful. URL=file:///data/data/com.RQMLight/files/www/default/RQMLight.html

onMessage(onReceivedError,{"errorCode":-6,"url":"file:///data/data/com.RQMLight/files/www/default/RQMLight.html","description":"The connection to the server was unsuccessful."})

回答

1

我通过添加延伸WLDroidGap主要的Java类以下行解决了这个问题。写在这里面onWLInitCompleted()方法

super.setIntegerProperty("loadUrlTimeoutValue", 60000); 
+0

通常情况下,你不应该这样做,但可能是你的网络条件@工作增加了一些延迟...在任何情况下 - 好!请将此标记为已回答。谢谢。 – 2013-05-20 03:20:56

0

我有同样的问题。

我已经在WL应用程序中使用服务器的真实IP地址,而不是使用本地主机解决了这个问题:

  1. 当模拟器运行你的应用程序,按菜单键。
  2. 选择可更改服务器的URL
  3. 删除“localhost”并使用IP地址。
  4. 接受并重试。

这解决了我的问题。

相关问题