简体   繁体   中英

Google App Engine, gradle, open port

I'm developing an android app with Google app engine endpoint using Android Studio.

Is it possible to make the local app engine server open the port it is running on? I'm trying to debug an android application with a phone that is in the same LAN as my app engine server but I can't do that because the ports doesn't open. Meaning, while I'm able to reach the server program at localhost:8080 from the server computer, I'm not able to reach it from my phone at {server_ip}:8080 .

Now I'm sure I am not having problems with port-forwarding in my router, since when I take the generated war-file and deploy it to a tomcat server, I'm able to reach the server from my phone. But then I will not be able to do a step-by-step debugging in Android Studio.

Thanks NNJ,

After reading that post ( https://stackoverflow.com/a/21776775 ), I understood that I should include httpAddress = '0.0.0.0' in my build.gradle for the server module and now I'm able to reach the endpoints from outside the server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM