Android设备和XAMPP服务器连接 [英] Android device and xampp server connection

查看:140
本文介绍了Android设备和XAMPP服务器连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有使用仅使用USB连接线,没有其他的意思,如WiFi和移动网络的Andr​​oid设备从XAMMP服务器访问Android应用数据库的任何方法。
我经历了许多文章和论坛去找出这个问题,但没有发现任何有用的。我想通过我的应用程序从Android设备本地主机XAMPP数据库(三星Galaxy S 2)进行连接。我曾尝试

Is there any method to access the android app database from xammp server using android device using only usb cable and no other mean, like wifi and mobile network. I have gone through many articles and forums to find out this problem but haven't find anything helpful. I am trying to connect the database on localhost xampp from android device (Samsung Galaxy s 2) through my app. I have tried

127.0.0.1

127.0.0.1

127.0.0.1:80

127.0.0.1:80

127.0.0.1:8080

127.0.0.1:8080

10.0.2.2

10.0.2.2:80

10.0.2.2:80

10.0.2.2:800

10.0.2.2:800

也试过我的笔记本电脑的IP地址。

also tried my laptop ip address.

当我试图从日食调试我的应用程序在设备上,应用程序启动,但是当我点击从本地主机设备获取数据(产品清单)只是说,不幸的是MYAPP刚刚停止工作和应用程序被关闭。这是当我不使用我的设备上的WiFi,但它工作得很好,当我的设备连接到无线网络。可能有一些地方时有没有wifi所以,如果USB选项将是不错的。

When i try to debug my app from eclipse on device, the app starts but when i click to get data (product list) from localhost the device just say that "unfortunately Myapp just stop working" and app is closed. This is when i am not using wifi on my device, but it works well when my device is connected to wifi. May be there are places when there is no wifi so in case usb option will be good.

推荐答案


  • 安装XAMPP

  • 在安装XAMPP计算机上启动Apache

  • 运行CMD.EXE(菜单
    开始 - >运行...)

  • 输入命令: IPCONFIG

  • install xampp
  • start Apache on computer where is installed xampp
  • run cmd.exe (menu start -> run ...)
  • enter command: ipconfig
  • IPv4地址是你所需要的。
    在输入Android设备的Web浏览器的IP地址(例如: 192.168.0.23
    你会看到XAMPP菜单。

    IpV4 Address is that what you need. Input in android device's web browser the IP address (example: 192.168.0.23) You will see xampp menu.

    这篇关于Android设备和XAMPP服务器连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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