尝试从我的服务器向 GCM 服务器发送消息时出现 java.net.HttpRetryException 异常。
try {
multiResult = sender.send(message, devices, RETRY_COUNT);
} catch(IOException e) {
logger.error("{0}\t- ANDROID : IOException occured during sending message: {1}", e.getMessage());
}
我已经成功注册了设备,但是这个发送方法给了我异常,如下所示
java.net.HttpRetryException: cannot retry due to server authentication, in streaming mode
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)
at com.google.android.gcm.server.Sender.sendNoRetry(Sender.java:362)
at com.google.android.gcm.server.Sender.send(Sender.java:261)
非常感谢任何帮助,谢谢