java.net.ConnectException: fail to connect to localhost/127.0.0.1(port 8080): connect failed:ECONNREFUSED….(Codename One App)

前端 未结 3 1129
深忆病人
深忆病人 2020-12-14 12:24

After build android application , I scanned the generated QRcode and install the application on galaxy s4 successfully. But when I try to do some search using the app I got

3条回答
  •  暖寄归人
    2020-12-14 12:41

    I have launched local API server, so i have problems with connecting through IP address.

    I found one solution, which helped me - you run your API server, start your emulator, and then you go to android ADB in CMD (path should be something like ....\AppData\Local\Android\Sdk\platform-tools). Then you go to that directory, just type in command: adb reverse tcp:8080 tcp:8080, and you should be able to reach it. Run your android app, problem should be solved.

    More about reverse proxy.

提交回复
热议问题