androidexception

what to do when the java.lang.illegalSateException (Module entity with name: .... should be available) occurs?


Alright so, i got the code from a coworker and when i start it with android studio i get this exception.

enter image description here

I guess, it might be as simple a what it states, a module is missing. But i dont know which one and the code works perfectly fine on the computer of my coworker.

I googeled the question as well, and the only anser one user gave in the intellij forum gave was, to lower the gradle version.

Thanks in advance!


Solution

  • I haven't gotten this error before but I did some research to help, can you try this:

    1. Rename your project directory to exactly match the value of rootProject.name in your root settings.gradle
    2. File > Invalidate Caches... > Invalidate and Restart

    Source: https://youtrack.jetbrains.com/issue/IDEA-317606/Changing-only-the-case-of-the-Gradle-root-project-name-causes-exception-while-importing-project-java.lang.IllegalStateException#focus=Comments-27-7257761.0-0