【问题标题】:How to assign a static IP to Android Emulator如何为 Android Emulator 分配静态 IP
【发布时间】:2013-07-06 15:53:52
【问题描述】:

我需要为我的 Android 2.2 模拟器分配一个静态 IP。因此,我检查了 Wi-Fi 设置下的使用静态 IP 选项并提供 Ip 和网关。但是当我使用 ifconfig eth0 在 adb shell 中检查时,它仍然显示默认 IP。看来我需要从命令行设置。有什么帮助吗?

【问题讨论】:

    标签: android networking ip settings emulation


    【解决方案1】:

    您可以查看此链接http://www.ehow.com/how_10006833_change-ip-android-emulator.html

    剧情简介

    说明

        1
    
        Boot the emulated Android device in the Android emulator.
        2
    
        Click the "Applications" icon.
        3
    
        Click "Settings."
        4
    
        Click "Wireless and Network."
        5
    
        Click "Wi-Fi Settings."
        6
    
        Click the "More" button.
        7
    
        Click "Advanced."
        8
    
        Click "Use Static IP."
        9
    
        Click "IP Address" and enter a new IP.
    

    【讨论】:

    • 我做了同样的事情,即使我做“eth0”,它也只将 IP 设为 10.0.2.15。那不是我模拟器的IP吗?
    【解决方案2】:

    在 Android 模拟器中,如果您执行 ifconfig,那么您将看到网桥、eth0 和 eth1 作为网络设备。桥有 10.0.2.15 作为 ip 并且 eth0 启动但没有任何 ip 并且 eth1 关闭没有任何 ip。

    REFER THIS

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-10-07
      • 1970-01-01
      • 2015-03-12
      • 1970-01-01
      • 2020-05-22
      • 2016-07-12
      • 2021-02-01
      相关资源
      最近更新 更多