can't open project - have .iml file but lost .idea directory

Hi Everyone. IDEA 10.5.2 will no longer open a project I was working on a few days ago, but it will open other ones. The "Choose" button is enabled, but does nothing. I've compared the two and it looks like I seem to have deleted my .idea directory, though I still have the project's .iml file. I think this is the problem, as when I create projects I take the default, which is directory-based projects. Questions: 1) Do you think the missing .idea directory is why it won't open? 2) If so, how do I recreate it? If I make a new project from scratch with that directory for "Project files location," it wants to replace the .iml file. Thanks in advance -- matt

2 comments

matthewcornell wrote:

1) Do you think the missing .idea directory is why it won't open?

Yes, that is the problem. The .idea directory IS the project to IDEA.

2) If so, how do I recreate it? If I make a new project from scratch with that directory for "Project files location," it wants to replace the .iml file.
  1. Create a new project, (using the "create project from scratch" option) but do not create any modules. - On the "New Project" dialog, uncheck the "Create Module" option
  2. With the project open, open the project structure (File > Project Structure or CTRL+ALT+SHIFT+S)
  3. Select "project" on the left under project settings
  4. Make any setting changes necessary
  5. Select the "modules" option on the left under project settings
  6. At the top, click the '+' icon to add a module
  7. Select "Import existing module" and browse to the modules .iml file and select it
  8. Click Finish
  9. Repeat steps 6-8 for all your modules
  10. Click OK to the Project Structure dialog and let IDEA to index everything.
0

Please sign in to leave a comment.