遇到奇怪的问题,我的应用程序在"预览" servlet,但是当我试图在Android模拟器中运行时会出现奇怪的错误并最终超时,
10-12 10:13:59.860: W/PluginManager(885): THREAD WARNING: exec() call to WLAuthorizationManagerPlugin.getClientInstanceIdHeader blocked the main thread for 7546ms. Plugin should use CordovaInterface.getThreadPool().
10-12 10:14:00.080: D/wl.request(885): WLRequestSender.run in WLRequestSender.java:40 :: Sending request http://10.0.0.9:10080/DoradoBankProject/authorization/v1/clients/instance
10-12 10:14:00.330: I/Choreographer(885): Skipped 53 frames! The application may be doing too much work on its main thread.
10-12 10:14:00.650: I/Choreographer(885): Skipped 34 frames! The application may be doing too much work on its main thread.
10-12 10:14:00.970: I/Choreographer(885): Skipped 34 frames! The application may be doing too much work on its main thread.
10-12 10:14:01.290: I/Choreographer(885): Skipped 33 frames! The application may be doing too much work on its main thread.
10-12 10:14:04.000: E/NONE(885): Request timeout for [/apps/services/api/DoradoBankProject/android/query]
请注意,我在此模块中没有使用任何身份验证。这就是我的adaptor.xml的样子
<procedure name="getAccounts" securityTest="wl_unprotected"/>
<procedure name="getTransactions" securityTest="wl_unprotected"/>
我不确定导致这种或任何方式调试的原因。
答案 0 :(得分:0)
通常在为应用程序指定了错误的主机名时发生。通过桌面浏览器在控制台中预览应用程序时,它具有开发服务器分配的IP,但是在设备中运行时,必须确保使用正确的IP或主机名。如果使用“localhost”,这将是一个问题。
我从日志中看到使用10.0.0.9,你能否确认这是服务器的IP?我建议找到你的公共IP地址,并将其用作wlclient.properties中的主机值。