Coding⏱️ 2 min read📅 2026-05-30

How to Fix: Android studio Error "Unsupported Modules Detected: Compilation is not supported for following modules"

Android Studio error message indicating unsupported Java modules and compilation issues.

Quick Answer: Remove non-Gradle Java modules from your project to resolve the issue.

The error 'Unsupported Modules Detected: Compilation is not supported for following modules' in Android Studio occurs when you have a Java module referenced by other non-Gradle modules or Android-Gradle modules within the same project.

🛑 Root Causes of the Error

  • The presence of non-Gradle Java modules and Android-Gradle modules in one project causes this error.

🔧 Proven Troubleshooting Steps

Method 1: Remove Non-Gradle Modules

  1. Step 1: Open your project's build.gradle file and remove any non-Gradle Java modules.

Method 2: Replace Non-Gradle Modules with Gradle Modules

  1. Step 1: Replace non-Gradle Java modules with their Gradle counterparts.

🎯 Final Words

By following these steps, you can resolve the 'Unsupported Modules Detected: Compilation is not supported for following modules' error in Android Studio and successfully compile your project.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions