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

ยท 179 words ยท 1 minute read

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.

Share: