Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to correct an incorrectly imported project in Intellij. Getting error - Not a valid project ID

I cloned my repo and using the existing build.sbt, I imported the project in Intellij (I don't remember the setting I used when doing so). I notice that Intellij have the project a name of its own - web_3075 while the name of my project is TestProject (name := "TestProject"). Now when I try to compile the project, I get the error Not a valid project ID: web_3075. How could I solve the issue?

Could I safely delete .idea file and import the project again?

like image 840
Manu Chadha Avatar asked May 31 '18 19:05

Manu Chadha


1 Answers

Workaround (but certainly not preferred approach). Unless I made some mistake, Intellij should fix this issue

1) I imported the project using build.sbt. I let Intellij do what it likes 2) It gives my project a name - web_5012. It creates .idea directory which has modules directory and some files. The trick is to replace web_5012 with your project name in all the files in .idea (.NAME file, modules.xml, scala_compiler.xml)and to replace web_5012.iml and web_5012-build.iml in .idea/modules with your project's iml files

like image 113
Manu Chadha Avatar answered Nov 08 '22 20:11

Manu Chadha