12
6

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 1 year has passed since last update.

Androidエミュレータでネットワークに接続できない場合の対処法

Posted at

ステップ1: Android SDKの場所を確認する

  1. Android Studioを開き、右下の「Configure」をクリックします。
  2. 「Project Defaults」→「Project Structure」を選択します。
  3. 「Android SDK Location」で、SDKのパスが表示されていることを確認します。

ステップ2: エミュレータのDNS設定を変更する

1 . ターミナルを開き、Android SDKのパスに移動します。

bash
cd /Users/xxx/Library/Android/sdk

2 . emulatorフォルダに移動します。

bash
cd emulator

3 . エミュレータの一覧を確認します。

bash
./emulator -list-avds

4 . それぞれのデバイスを起動し、DNS設定を変更します(デバイス名は適宜変更してください)。

bash
./emulator -avd <自分のエミュレータの名前> -dns-server 8.8.8.8

これらの手順により、Androidエミュレータでネットワークに接続できるようになります。

12
6
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
12
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?