AndroidStudio编译项目时报错:Unsupported Modules Detected: Compilation is not supported for following modules: XX.
Unfortunately you can't have non-Gradle Java modules and Android-Gradle modules in one project.
解决方案:删除项目根目录.idea文件,重启AndroidStudio,然后发现可以正常编译和运行