我已经实现了 GcmDemo 应用程序,它在使用模拟器测试时工作正常
但是在使用真实设备进行测试时,相同的应用程序无法正常工作
我能够注册 GCM 服务器并获取注册 ID,但无法注册 TomCat 服务器
我已经按照教程http://androidv5.wordpress.com/2012/08/15/how-to-implement-google-cloud-messaging/
日志猫:
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
任何人都可以帮忙吗?