Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio - Unsupported Modules Detected - Unfortunately you can't have non-Gradle Java modules and Android-Gradle modules in one project

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.

like image 642
OwN Avatar asked Apr 07 '20 04:04

OwN


1 Answers

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

like image 73
Ahmed Raza Avatar answered Oct 19 '22 18:10

Ahmed Raza