There is another strange error that encounters from time to time at the start of IntelliJ IDEA. Gradle refuses to sync project with a following text:
I’ve found a good solution for it here, but it is for Eclipse. Some further analysis indicated that problem is actually in the insufficient amount of available RAM. After closing web browser (500 mb RAM to free) and pressing “Try Again” link in IDEA project has synced without any issues.