0

我正在尝试在代理后面的模拟器中的 Android Webview 中加载远程 html 文件。如果我尝试在 Android 模拟器浏览器中加载相同的远程 html 文件,它加载正常没有任何问题。所以在此之前我做了代理使用以下路径在模拟器中设置。Settings->Wireless&Networks->Mobile Networks->Access Point Names->Telkila 然后我配置了我的代理、端口、用户名和密码。这样 Android Emulator Browser 就可以使用我配置的代理设置,但不能使用 Android 应用程序在模拟器中运行的(.apk)。有帮助吗?

提前致谢。

文卡特。

4

1 回答 1

1

在你的 android 活动 onCreate() 中尝试这样的事情

System.getProperties().put("proxySet", "true");
            System.getProperties().put("proxyHost", "127.0.0.1");
            System.getProperties().put("proxyPort", "8000");

只需根据您的情况输入代理主机和端口的值。

于 2012-12-07T05:19:48.963 回答