无法连接手机上运行的android应用程序与本地主机 [英] Not able to connect android app running on phone with localhost

查看:156
本文介绍了无法连接手机上运行的android应用程序与本地主机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用GCM制作Android应用程序。我试图通过我在手机上运行的应用程序注册,输入无法使用php存储在localhost XAMPP上。我的手机和笔记本电脑在同一个网络上运行。 localhost的ip地址有问题。我使用这个URL保存在本地主机上,其中192.168.43.247是pc在电话的3G网络帮助下运行时的IP地址。
192.168.43.247/gcm_server_php/register.php



请帮忙!


解决方案

打开XAMPP>阿帕奇> CONF>以记事本HTTP-conf的文件



查找听80,并使用#(如#Listen 80)注释掉,并在其下面写下:Listen(服务器的静态IP地址):80

例如:

  Listen 192.168.1.34:80 


I am making an Android Application using GCM. I am trying to register through my app running on phone, the inputs are not able to store on localhost XAMPP using php. My phone and laptop are running on the same network. There is some problem with the ip address of localhost. I am using this url for saving on local host, where 192.168.43.247 is the ip address when pc is running with the help of phone's 3G network. 192.168.43.247/gcm_server_php/register.php

Please help!

解决方案

Open Xampp>apache>conf>http-conf file in notepad.

Find Listen 80 and comment out using #(like #Listen 80) and write below it: Listen (static ip address of server):80

eg:

Listen 192.168.1.34:80

这篇关于无法连接手机上运行的android应用程序与本地主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆