-2
我想使用GCM製作Android應用程序...應用程序運行並填寫表單但是當我點擊註冊按鈕時,以下出現錯誤:(我的PHP頁面沒有改變的意思是它不註冊我!)未能連接到/127.0.0.1(端口80)在GCM android應用程序使用eclipse
05-13 04:22:23.495: E/URL(12039): > http://127.0.0.1/gcm_server_php/register.php
05-13 04:22:23.590: E/AndroidHive GCM(12039): Failed to register on attempt 1:java.net.ConnectException: failed to connect to /127.0.0.1 (port 80): connect failed: ECONNREFUSED (Connection refused)
我知道錯誤什麼,但如何解決它?
請注意,我使用的是appserv。
使用http://10.0.2.2/代替http://127.0.0.1/ – theapache64
我以前試過,不工作....我用我的手機不emulater –
這就是問題,你不能從手機訪問本地主機。或者只是將其託管在某處並進行測試 – theapache64