我已經實現GcmDemo應用程序,它工作正常時,用模擬器GCM演示應用程序未能註冊到tomcat服務器
測試,但是,當一個真正的設備
測試工作不相同的應用程序我能與GCM服務器並獲取註冊ID註冊,但不能與Tomcat服務器
我按照教程註冊http://androidv5.wordpress.com/2012/08/15/how-to-implement-google-cloud-messaging/
logcat的:
06-19 12:44:27.620: E/trade(4424): Failed to register on attempt 1
06-19 12:44:27.620: E/trade(4424): java.net.ConnectException: failed to connect to /192.1.2.101 (port 8080): connect failed: ETIMEDOUT (Connection timed out)
06-19 12:44:27.620: E/trade(4424): at libcore.io.IoBridge.connect(IoBridge.java:114)
06-19 12:44:27.620: E/trade(4424): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
06-19 12:44:27.620: E/trade(4424): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459)
06-19 12:44:27.620: E/trade(4424): at java.net.Socket.connect(Socket.java:848)
06-19 12:44:27.620: E/trade(4424): at libcore.net.http.HttpConnection.<init>(HttpConnection.java:77)
06-19 12:44:27.620: E/trade(4424): at libcore.net.http.HttpConnection.<init>(HttpConnection.java:50)
06-19 12:44:27.620: E/trade(4424): at libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:351)
06-19 12:44:27.620: E/trade(4424
任何人都可以幫忙嗎?
我在設備瀏覽器上鍵入了服務器URL,我無法打開Tomcat主頁,我的系統的IP地址我還沒有通過命令IPConfig登陸 – String
您的設備與系統位於同一網絡?要在設備上打開服務器頁面,您的設備和服務器需要位於同一網絡中 – Nargis