Gradle failed to sync on idea 13.1.1

I am creating an Android project with a Gradle Android module, but as soon as I create it, I have an error that I do not understand, and I have no idea how to solve it. It says:

Gradle Project sync error. The main functions (for example, editing, debugging) will not work properly "or" Gradle "updating myapp project" failed: a fatal exception occurred. The program will be closed .: Gradle settings

If you have an idea of ​​what causes this problem, or if you have already encountered it, tell me what to do.

+7
android intellij-idea android-gradle gradle
source share
3 answers

I ran into the same problem. In part, this may be because you recently installed the Android SDK and did not accept the license agreement. Here are the steps you can take. (I used IntelliJ Ultimate IDEA 14.0.2.)

  • Stop IntelliJ and restart it with administrator privileges. (You will expand the zip files in the Program Files (x86) directory and you will not be able to do this if you are not an administrator).
  • There is a hyperlink in the “Gradle Sync Messages” (bottom window) that says the error: “Install repository and synchronize the project”. Click on it.
  • Accept the license agreement.
+1
source share

Display logs from the event log window. One possibility might be that the gradle configuration file points to a non-existent version of gradle. You can find it under gradle -> wrapper -> gradle -wrapper-properties

0
source share

This question happened when I had a similar problem. I solved this problem as follows

  • Download and unzip the gradle file to the selected directory

  • Set the environment variable for gradle, I think this does not affect the solution.

  • Go to the input and access window through File → Setting

  • In the settings window, go to "Assembly", "Run." Deployment → Build Tools → Gradle

  • Check the box "Use local gradle distribution

  • From gradle access to the home field gradle the set path

Please note that I am working with intellij 15.

0
source share

All Articles