How to connect android emulator to the internet

前端 未结 30 1600
独厮守ぢ
独厮守ぢ 2020-11-22 04:38

How can I connect my Android emulator to the internet, e.g. to use the browser? I\'ve found lots of advice on what do to when your connected through a proxy, but that\'s not

30条回答
  •  青春惊慌失措
    2020-11-22 04:56

    There are different solutions to this problem . One of these , i will show you on my experiment and outcomes seen on results using a recent android studio and AVD images downloaded 2017.

    1. First thing you have to do is launch your AVD from android studio.(in my case i choose NEXUSAPI25 android 7.1 image)

    2. Goto Settings->Wirless and Networking - > Cellular Network - > Access Points -> (+) press add - > enter the following if you dont have NTLM proxy or proxy at all (that means you are directly connected)

      a. add apn name as myAPN b. add apn server => www c. save and try browsing the internet.

    if this doesn work add 'ANDROID_SDK_ROOT' in you environment variable

    Then , launch AVD using emulator command as follow

    emulator -avd Nexus25 -dns-server 8.8.8.8
    
    1. For those who use NTLM proxies , i will show you how it work for me next.

    2. add your Android_sdk_root path into your environment variable. THis make command line code read succesfully like using AVD names and so on.

    3. Launch your emaulator using the following command

    >emulator -avd Nexus_5X_API_25 -http-proxy http://username:password@ipaddress:port

    ENTER

提交回复
热议问题