【问题标题】:How to get Google Cloud Tools for Android Studio listen on all IP addresses如何让 Google Cloud Tools for Android Studio 监听所有 IP 地址
【发布时间】:2014-12-21 17:00:31
【问题描述】:

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

【问题讨论】:

  • 仅供参考,--address 参数已重命名为 --host

标签: android gradle android-studio google-app-engine


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-10-01
    • 1970-01-01
    • 2011-06-15
    • 2018-05-22
    • 2014-06-10
    • 1970-01-01
    • 2021-11-14
    相关资源
    最近更新 更多