Value In Brief – by Abanoub Hanna
All You Need To Know Explained In Brief

[fixed] Android studio Error "Unsupported Modules Detected: Compilation is not supported for following modules"

Android Java Kotlin Error fixing Tips & Tricks

Method 1 : Try Invalidating Android Studio Cache

Just go File -> Invalidate Cache & Restart. So, Android Studio will remove cache and rebuild it and the project itself. If this solves the error, good for you. If not, try the next step.

Method 2 : Remove Unused Modules

Click Command+Shift+F, type modules.xml, open the file, remove the modules that cause the error.

If the error persists, try the 3rd method.

Method 3 : delete .idea and *.iml files

1- close the project

2- close Android Studio IDE

3- delete the .idea directory located inside the project folder. You can use this command to delete .idea directory rm -rf .idea.

4- delete all .iml files. You can use this command to see all the .iml files find . -name "*.iml" -type f, then to delete them add -delete like this find . -name "*.iml" -type f -delete.

5- open Android Studio IDE and import the project

I hope this helps you. You know someone will benefit from this, share it with him/her, a friend or colleage.