Gradle fails to sync/refresh

Hi there,
I'm willing to create an Android project with Gradle Androi Module, but as soon as I create it, I have an error I don't understand and I have no idea to resolve it. It says
"Gradle project sync failed. Basic functionnality (e.g editing, debugging) will not work properly" or "Gradle 'myapp' project refresh failed: A fatal exception has occurred. Program will exit. : Gradle settings"

If you have an idea of what causes this problem or if you have already encountered it, please tell me what to do. I'm using IntelliJ 13.1.1
Waiting for your answers.?:| Thx :)


could you reproduce the error and attach idea.log file?


here is the idea.log,
I've tried to create a new Android-Gradle app (2014-04-02 13:48) and it still doesn't work.


try to set lower -Xmx in gradle settings: File => Settings => Gradle => Global Gradle settings => Gradle VM options: "-Xmx500m"


GREAAAT !!! It works !! I mean, I don't get the same error anymore; I think it's ok. I'm feeling a bit dumb, cause I tried to raise it to 1024, then 2048. #smh Thanks again.


What may be the Problem, if after opening settings>Gradle page says "Loading", but did not show up? Can I edit -Xmx settings otherwise?
Можно на русском?


Нашёл такие настройки в Settings>Compiler>Gradle, поставил 500, но не помогло(


You can edit <your project path>/.idea/gradle.xml file directly, but this is not a recommended way.
You'd better to use settings window. I'm not aware of the problem during opening Gradle settings page. Please, file an issue for it at and attach idea.log file if possible.

gradle.xml file sample:

<?xml version="1.0" encoding="UTF-8"?> <project version="4">   <component name="GradleSettings">     <option name="linkedExternalProjectsSettings">       <GradleProjectSettings>         <option name="distributionType" value="DEFAULT_WRAPPED" />         <option name="externalProjectPath" value="$PROJECT_DIR$" />         <option name="modules">           <set>             <option value="$PROJECT_DIR$" />           </set>         </option>       </GradleProjectSettings>     </option>     <option name="gradleVmOptions" value="-Xmx512m" />   </component> </project>


Please sign in to leave a comment.