65
47

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Android エミュレーターでネットワークに繋がらない時

Posted at

1. SDKの場所を確認する

  • Android Studioを開き、右下のConfigerを押下
    image.png

  • Project Defaults → Project Structureを選択
    image.png

  • Android SDK LocationにSDKのパスがあることを確認
    image.png

emulatorのDNSを変更させる

  • ターミナルでSDKのパスに移動
cd /Users/xxx/Library/Android/sdk
  • さらにemulatorフォルダに移動
cd emulator
  • emulatorの一覧を確認
./emulator -list-avds

と打つと、私の場合はこれ↓が返ってきました

Nexus_5X_API_19
Nexus_6_API_22
Pixel_2_XL_API_23
Pixel_XL_API_19
  • デバイスを一個ずつ起動させる(Nexus_5X_API_19の箇所は自由に変えてください)
./emulator -avd Nexus_5X_API_19 -dns-server 8.8.8.8

この手順でネットワークにつながりました!

65
47
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
65
47

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?