79449370

Date: 2025-02-18 19:28:08
Score: 0.5
Natty:
Report link

In my case, IntelliJ created 2 module configurations: the old and the new. It was using the old one. I tried to delete it from Project Structure, but IntelliJ refused to delete it.

So I closed IntelliJ and deleted the module from the console with the following commands:

  1. Remove IntelliJ IDEA project files: rm -rf .idea find . -name "*.iml" -type f -delete

  2. Clean Gradle build: ./gradlew clean

  3. Remove Gradle caches for your specific project: rm -rf ~/.gradle/caches/modules-2/files-2.1/YOUR_FOLDER_HERE

    For example, if you are in a project com.enterprise.something.else, you should do: rm -rf ~/.gradle/caches/modules-2/files-2.1/com.enterprise

  4. Open IntelliJ and use "File -> Open Project" to import the project from scratch, allowing IntelliJ to reconfigure everything.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Mariano Cali