Android Studio 报错:Compilation is not supported for following modules

时间:2024-03-13 09:01:43

问题

Android Studio Sync时总是报错

Compilation is not supported for following modules: lib, news_video. Unfortunately you can't have non-Gradle Java modules and Android-Gradle modules in one project.

Android Studio 报错:Compilation is not supported for following modules

说明曾经创建了一个Module,没用正经的途径删除,导致.idea构建配置出Bug。

解决方案

打开/项目目录/.idea/modules.xml

Android Studio 报错:Compilation is not supported for following modules

删除报错提示的两行配置信息

Android Studio 报错:Compilation is not supported for following modules

重新Sync一下即可恢复正常

Android Studio 报错:Compilation is not supported for following modules