当我尝试从我的服务器向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)
非常感谢您的帮助,谢谢。
涉及IT技术方面的问题,如有需要请随时联系。