IntelliJでGradleのRefreshがコケたときの解決法

最近IntelliJからGradleのRefreshが失敗しまくっていました。

しかもエラーの内容が「Fatal error occurs」とかで原因が全然分からない。

.gradle消してみたりIntelliJ入れ直してみたりしても状況変わらず。

で、いろいろ検索してみると
http://forums.gradle.org/gradle/topics/gradle_v1_12_fails_to_refresh_projects_using_intellij

で「13.1.3で解決してるよ!」
との回答があったので早速

http://confluence.jetbrains.com/display/IDEADEV/IDEA+13.1+EAP

からインストール。

Refreshしたらまたエラーになったけど、エラーの内容が詳しくなってました。

Error:Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at http://gradle.org/docs/1.12/userguide/gradle_daemon.html
Please read below process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

あー、ヒープが足りていなかったのね。
そういえばIDEA入れたばかりでvmoptionsいじっていませんでした。

vmoptionsいじってもいいのですが、どうせ上限900MBちょいではじかれてしまうので64bit版を起動してみます。

が、

idea64 no jvm installation found

と出たので環境変数に下記を追加。

IDEA_JDK -> C:\dev\jdk1.8.0_05_64
Path -> C:\dev\jdk1.8.0_05_64\jre

(Path側がJREなところにハマった)

これでidea64を起動したところ、問題なくRefreshできるようになりましたとさ。


投稿日

カテゴリー:

投稿者:

タグ:

コメント

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください