【问题标题】:android emulator cannot connect to internetandroid模拟器无法连接到互联网
【发布时间】:2011-07-29 08:17:35
【问题描述】:

我无法通过 android 模拟器连接到互联网。我确实通过其他帖子检查我是否遗漏了什么但无济于事。

我的清单文件中也有权限

 <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

下面是我的日志

04-04 16:25:41.575: DEBUG/SearchDialog(285): launching Intent { act=android.intent.action.SEARCH flg=0x10000000 cmp=com.android.browser/.BrowserActivity (has extras) }
04-04 16:25:41.575 : INFO/SearchDialog(285): Starting (as ourselves) #Intent;action=android.intent.action.SEARCH;launchFlags=0x10000000;component=com.android.browser/.BrowserActivity;S.query=http%3A%2F%2Fyahoo.com;S.user_query=http%3A%2F%2Fyahoo.com;end
04-04 16:25:41.594: INFO/ActivityManager(59): Starting activity: Intent { act=android.intent.action.SEARCH flg=0x10000000 cmp=com.android.browser/.BrowserActivity (has extras) }
04-04 16:26:02.485: ERROR/Tab(285): onReceivedError -2 http://yahoo.com/ The URL could not be found.

我还在我的运行配置中添加了 -dns-server 8.8.8.8 ...这也没有用。

我在家工作时可以连接到互联网 (wifi)。在工作时我无法连接到 LAN(已禁用 wifi)。

任何建议我缺少什么。

【问题讨论】:

    标签: android android-emulator android-manifest


    【解决方案1】:

    您确定没有在模拟器中禁用互联网连接吗?

    来自this文档:

    Toggle cell networking on/off   F8
    

    另一方面,您是否尝试过创建一个新的模拟器以确保您没有在没有互联网的情况下创建它?

    【讨论】:

      【解决方案2】:

      如果您的工作使用代理,则必须配置模拟器以单独处理它。

      【讨论】:

        猜你喜欢
        • 2011-11-07
        • 1970-01-01
        • 2012-07-06
        • 1970-01-01
        • 2011-07-14
        • 2012-11-12
        • 2018-06-11
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多