如何让Android Studio的Google Cloud Tools侦听所有IP地址 [英] How to get Google Cloud Tools for Android Studio listen on all IP addresses

查看:166
本文介绍了如何让Android Studio的Google Cloud Tools侦听所有IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用适用于Android Studio的Google Cloud工具,无法从我的网络上的任何其他设备或本地机器的192.169.etc地址访问本地服务器。看起来我需要将服务器设置为侦听所有IP地址,而不仅仅是localhost,这似乎是通过使用命令行参数--address = 0.0.0.0运行完成的。问题是我根本无法在Android Studio中找到该位置。任何人都可以提供帮助吗?

I am trying out the Google Cloud tools for Android Studio and cannot access the local server from any other devices on my network or locally via the machine's 192.169.etc address. It appears I need to set the server to listen on all IP addresses, not just localhost, which appears to be done by running with the command line argument --address=0.0.0.0. The problem is I cannot find where to do this in Android Studio at all. Can anyone help?

推荐答案

好的,我只是解决了它(实际上我重新阅读了 https://github.com/GoogleCloudPlatform/gradle-appengine-plugin )。
在build.gradle文件的'appengine'字段中添加httpAddress =0.0.0.0对它进行排序。
作为参考,我的build.gradle现在包含:

OK I just worked it out (actually i re-read the documentation at https://github.com/GoogleCloudPlatform/gradle-appengine-plugin). Adding httpAddress="0.0.0.0" within the 'appengine' field in my build.gradle file sorted it. For reference, my build.gradle now includes:

appengine {
    downloadSdk = true
    appcfg {
        oauth2 = true
    }
    endpoints {
        getClientLibsOnBuild = true
        getDiscoveryDocsOnBuild = true
    }
    httpAddress="0.0.0.0"
}

这篇关于如何让Android Studio的Google Cloud Tools侦听所有IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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