3
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?

Android Studioで「Broken pipe. The Gradle daemon may be trying to use ipv4 instead of ipv6.」が出たときに対応した方法

Posted at

ビルドしたら以下のエラーになったので、その時に対処したときのメモです。

Broken pipe.
The Gradle daemon may be trying to use ipv4 instead of ipv6.

この対処方法については以下のサイトに記載されています
https://developer.android.com/studio/known-issues#broken_pipe

手元の環境はMacなのでWorkaround 2を採用しました。

Workaround 2: in Android Studio's vmoptions file, change the line 
-Djava.net.preferIPv4Addresses=true to -Djava.net.preferIPv6Addresses=true 
For more information, see the Networking IPv6 User Guide.

対応した手順

  • (1) Android Studio で 🔍️ をクリックして、検索欄に edit custom vm と入力し、studio.vmoptionsを開く

android_studio_screenshot.png

  • (2) -Djava.net.preferIPv4Stack=true を追加
    android_studio_screenshot2.png

  • (3) Android Studio を再起動

以上の手順でエラー回避できました。

3
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
3
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?