Today, I used idea to download the project from Git. I set the way of opening the new window after checkout. However, I tried several times, but I still had to blink back when opening the project.

So I tried to open the local project, no problem!

Create a new directory locally, open it, and blink back!

Switch to another Git project, checkout, and blink out!

This I wonder, there is no such problem before, today in addition to the project opened before, other ways to open all flash back!

Morning search for half a day, there is no relevant post about this problem.

Therefore, I thought of checking the logs of IDEA. I searched online, found the log related directory, opened the log, and tried checkout Git project again. There were a bunch of errors in the log. On closer inspection, I found the key error:

ERROR – ect.impl.ProjectFrameAllocator – java.nio.file.NotDirectoryException:

/idea/libraries is a file, not a directory.

I can see the cause of the problem when I see this./idea directory:

 

Sure enough, here is a file, I entered the other open project, found is directory:

 

Then I tried two things:

1. Copy this folder from another directory to the corresponding directory of the project that cannot be opened. Try again to open the project.

2. I deleted the “libraries” file in the corresponding directory of the project that could not be opened. Then I opened the project again and regenerated the “Libraries” folder in the corresponding directory.

Therefore, the problem is that if idea is opened, go to the. Idea directory to search for the folder. If it is found, the folder will be opened successfully, but if it is not found, a new folder will be created.

There is a file on my colleague’s computer, but it can be opened normally. Visually, it is related to the version of IDEA. My version is 2020.3.

There may be configuration for this, but I have not found the relevant configuration so far, so I can only solve it in this way.

If anyone finds this configuration, please let me know, thanks!