參考401:HTTP://developer.android.com/google/gcm/demo.htmlHTTP狀態代碼:在GCMDemo
服務器嘗試發送郵件到我的Android設備時,401。
HTTP Status 500 - HTTP Status Code: 401
type Exception report
message HTTP Status Code: 401
description The server encountered an internal error (HTTP Status Code: 401) that prevented it from fulfilling this request.
exception
com.google.android.gcm.server.InvalidRequestException: HTTP Status Code: 401
com.google.android.gcm.server.Sender.sendNoRetry(Sender.java:177)
com.google.android.gcm.server.Sender.send(Sender.java:121)
com.google.android.gcm.demo.server.SendAllMessagesServlet.doPost(SendAllMessagesServ let.java:83)
javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.29 logs.
有人能告訴我如何解決?謝謝!
我通過在谷歌開發控制檯中生成一個額外的服務器端API鍵來解決這個問題。 –