Play framework tutorial: Cannot resolve symbol 'index'?

djangofan picture djangofan · Jun 5, 2013 · Viewed 17.9k times · Source

I followed a tutorial here and although I got the entire tutorial working just fine, one of the classes in my IntelliJ project is marked with "red warnings". I cannot figure out what the problem is here? The project works but it shows these warnings? Any ideas on what this is and how to fix it? In the tutorial, about 3.5 minutes into it, the red marks magically disappear and the video presenter doesn't explain it.

enter image description here

Answer

user363349 picture user363349 · Jan 30, 2014

This process worked for me:

  1. go into [File -> Project Structure -> Modules -> [YourAppModule] -> Sources Tab]
  2. navigate to the "target/scala-[version]/src_managed" directory (panel on the right).
  3. Right click the "main" directory and flag it as a source folder.
  4. Right click "controllers" and "views" and remove the "sources" flag (you should see the controllers and views folder become package directories).
  5. Apply -> OK -> recompile.

from https://github.com/playframework/playframework/issues/1784#issuecomment-26345523