https://kotlinlang.org logo
Title
j

Jan

09/08/2021, 11:34 PM
IntelliJ just reloaded my project and removed all modules ? Now no class etc. gets recognized. How can I fix that?
b

Ben Woodworth

09/09/2021, 12:05 AM
I think syncing Gradle should fix it
j

Jan

09/09/2021, 12:21 AM
No that didn't help
I somehow have to reimport the modules but I have no idea how to do it
c

CLOVIS

09/09/2021, 7:59 AM
What error did you get? That is how you should do it.
a

andylamax

09/09/2021, 10:32 AM
also, try deleting the .idea, and the .gradle directories, then invalidate caches + restart IDEA
j

Jan

09/09/2021, 12:10 PM
weirdly this only happens when I add that dependency: https://github.com/korlibs/korio
but thats a multiplatform dependency?
c

CLOVIS

09/09/2021, 12:12 PM
What's the error message? We can't help without it.
j

Jan

09/09/2021, 12:30 PM
there is no error
I only see when I add the dependency "These modules have been removed by gradle reload" and they were gone
but the jvm modules are still there?
c

CLOVIS

09/09/2021, 5:59 PM
If you run
gradle tasks
or similar, do the tasks for the modules that disappeared show up?
a

andylamax

09/09/2021, 6:23 PM
Looks like korio doesn't have one of the targets you are targeting thene
m

Michal Harakal

09/13/2021, 9:32 AM
I was facing similar issues in the past too and what helps additionally to hints from @andylamax was running gradle build in terminal from CLI with
--info
or even
--debug
Sometimes are error messages displayed in CLI run not showing in or hard to find in IntelliJ&Co