如何从ADT插件与代理主机/端口/用户/密码启动模拟器? [英] How to start emulator from ADT plugin with proxy host/port/user/password?

查看:170
本文介绍了如何从ADT插件与代理主机/端口/用户/密码启动模拟器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我意识到一个问题,我与在模拟器中的应用程序是因为仿真器没有与我的代理工作。我必须设置代理主机,端口,用户和密码。我没有看到从ADT此设置任何选项。我注意到,如果运行在命令行模拟器,有一个-http代理选项,但是这不能从一个从Eclipse中启动AVD管理器。我还注意到,当我运行SDK管理器Eclipse之外,还有标有设置里面有代理服务器设置额外的设置部分,但这只是主机和端口,而不是用户名和密码。

I'm realizing that one problem I had with an app in the emulator is because the emulator wasn't working with my proxy. I have to set a proxy host, port, user, and password. I don't see any options for setting this from the ADT. I noticed that if you run the emulator from the command line, there is a "-http-proxy" option, but that's not available from the AVD Manager that is started from Eclipse. I also noticed that when I run the "SDK Manager" outside of Eclipse, there is an additional settings section labeled "Settings" which has proxy settings, but that's only the host and port, not user and password.

难道没有人知道,也有人将来自经过认证的代理之后运行此?

Did no one realize that some people would be running this from behind an authenticated proxy?

推荐答案

在Eclipse中,转到运行 - >运行配置。选择您的应用程序,然后单击目标选项卡上。在附加仿真器的命令行选项,您可以在-http代理参数,你需要任何其他任意命令行选项类型。您可能需要重新启动仿真器和/或您的计算机,使更改生效。

In Eclipse, go to Run->Run Configurations. Select your application and then click on the "Target" tab. In the "Additional Emulator Command Line Options" you can type in the -http-proxy argument and any other arbitrary command line options you need. You might need to restart the emulator and/or your computer for the changes to take effect.

您也可以只启动通过命令行模拟器,与代理开关。 Eclipse中仍然会应用程序部署到它。它真的不会在开发过程有所作为。

You could also just start the emulator from the command line, with the proxy switch. Eclipse will still deploy your application to it. It really won't make a difference during your development process.

要尝试的最后一件事是设置仿真器内部代理。如果你钻到设备上的APN设置(类似设置 - >无线和网络 - >)有代理设置。这些将持续在模拟器上。您可能需要设置这些后,重新启动模拟器没有代理交换机。

The final thing to try is to set the proxy inside the emulator. If you drill into the APN settings on the device (something like settings->wireless and networks->) there are proxy settings. These will persist on the emulator. You might need to restart the emulator without the proxy switch after setting these.

我们希望,这些人会为你工作。在模拟器总的来说,我发现代理支持为pretty片状。

Hopefully, one of these will work for you. Overall, I've found proxy support in the emulator to be pretty flaky.

这篇关于如何从ADT插件与代理主机/端口/用户/密码启动模拟器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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