Unable to make the module: related gradle configuration was not found. Please, re-import the Gradle project and try again

I use IntelliJ IDEA Ultimate 14 and Gradle 1.2. I manage the project from the console, but I need to debug some of the code from the IDE. When I try to make the project, this error window appears...