Error: Unfortunately you can't have non-Gradle Java modules and > Android-Gradle modules in one project Error: Unfortunately you can't have non-Gradle Java modules and > Android-Gradle modules in one project android android

Error: Unfortunately you can't have non-Gradle Java modules and > Android-Gradle modules in one project


1- close the project

2- close Android Studio IDE

3- delete the .idea directory

4- delete all .iml files

5- open Android Studio IDE and import the project

Answer from here


  1. Go to File -> Invalidate Caches/Restart.
  2. Close the project.
  3. Go to project folder and delete .idea folder.
  4. Delete YourProjectName.iml in project folder.
  5. Delete app.iml in app folder.
  6. Open Android studio -> open existing project, and then select yourproject.
  7. The Load Settings error and Unsupported modules detected error willbe gone.


  1. Close the project
  2. Just delete the modules.xml in .idea folder.
  3. Open the project again.