代码之家  ›  专栏  ›  技术社区  ›  primo

在真实设备上运行Android应用程序

  •  0
  • primo  · 技术社区  · 7 年前

    我在研究nodejs,mysql,android 我想在真实设备上测试我的Android应用程序,并在相同的WiFi网络上连接我的笔记本电脑和手机,并在URL中指定我使用Volley库时的IP地址。

    URL是: http://ipaddress:8080 8080是nodejs服务器端口

    但当我运行我的Android应用程序时,它不在nodejs服务器上运行。尽管请求是从Android端发送的,但nodejs服务器上不处理任何请求。

    我试过很多链接,但都不管用。 谢谢你的帮助

    1 回复  |  直到 7 年前
        1
  •  0
  •   primo    7 年前
    I have the answer to my question
    I tried the following link and it worked for me
    https://stackoverflow.com/a/17603378/8101634
    
    what it states is.
    1) Connecting android device through USB cable to laptop
    2) Switching USB tethering on android device
    3) Go to network and sharing center.
    4) It will show you the device and click on it.
    5) Click on details
    6) Take the Ipv4 address from there and use it as URL in android app
    7) Re-run your android application
    
    It works
    
    推荐文章