我有一个Android应用程序,当我将它部署到我的三星Galaxy Note 4,并运行应用程序时,它第一次运行时,它工作正常。但是,如果我退出应用程序并再次激活它,则无法连接到服务器。经过几次尝试再试一次,偶尔会再次使用。
以下是wlCommonInit中的代码:
WL.Client.connect(
{
onSuccess:connectivityCheckSuccess,
onFailure:connectivityCheckFailure,
timeout:5000
});
如果失败,它将执行" connectivityCheckFailure"回调函数
以下是logcat中显示的日志:
01-12 11:49:31.099: D/NONE(17766): Request [/apps/services/api/Macros/android/init]
01-12 11:49:31.309: D/GCMClientFactory(17766): GCMClientFactory.useGooglePlayServices in GCMClientFactory.java:42 :: Google Play Services is not used because the play services library is not found. So using the default GCM helper implementation.
01-12 11:49:31.319: D/GCMIntentService(17766): GCMIntentService.doWakefulWork in GCMIntentService.java:152 :: GCMIntentService : Received a registration message from the GCM server
01-12 11:49:31.319: D/GCMIntentService(17766): GCMIntentService.onUnregistered in GCMIntentService.java:186 :: GCMIntentService: Unregistered at the GCM server
01-12 11:49:36.129: E/NONE(17766): Request timeout for [/apps/services/api/Macros/android/init]
这表明init正在超时。
有人能让我知道出了什么问题吗?