7

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

I upgraded gradle from version 3.5.3 to 3.6.2 today in my Android Java project, and now I get this error:

Unsupported Modules Detected

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

Unfortunately, I tried every solution in the linked question, but nothing worked. I still get this error. It seems like my project compiles and works just fine though. However, this error is annoying... continually popping up.

Anyone know how to fix it? I only started having this issue since the upgrade of Android Studio, gradle, and other updates recently pushed out.

OwN
  • 1,248
  • 12
  • 17

1 Answers1

17

Follow these steps one by one to solve the error.

  1. Close the Project
  2. Exit Android Studio
  3. Then go to your application folder and delete .iml file
  4. And also delete .idea Folder
  5. Then open Android studio again and import your project

Note- If .iml and .idea files are not visible then press Command, shift and > buttons together when you are inside your Application folder

Ahmed Raza
  • 1,343
  • 1
  • 15
  • 18