I have an IntelliJ 14.1.2 Project consisting of two modules - one is an Android Gradle based module and the other is a Spring Java-based module with Maven.
gps-track
Follow these steps :
1-Command+Shift+F
2-Type : modules.xml
3-Open file
4-Remove those you get error for (the module when you get error once building project)
Good luck :)