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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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"
}