Taddis
Taddis

Reputation: 156

Play Framework & IntelliJ - Cannot resolve symbol index/routes

I'm new to playframework/intellij and I have finally managed to import a play-java-intro succesfully (yey!), but when I try to edit the Application.java file, I see the error shown in the picture below "Cannot resolve symbol index" and "Cannot resolve symbol routes".

What does this mean? How do I get rid of these errors/warnings?

I have tried to run the program aswell to see if it works, and the project works. This means that the errors are showing false.

Also, how do I refresh the project in IntelliJ? I once managed to do this, but that was after a popup came in the topright corner. I have never managed to find the refresh button after that. Just a "Synchronize Project", which does nothing.

Error in IntelliJ

Upvotes: 3

Views: 3855

Answers (3)

inmyth
inmyth

Reputation: 9050

In Intellij 2022 try running sbt run once and hit the url (e.g localhost:9000) .

Tested on Play official samples

Upvotes: 0

Manish
Manish

Reputation: 131

I was having a similar issue and I Have updated my IntelliJ to version 2017.3 and everything is working fine now.

Upvotes: 0

asaad
asaad

Reputation: 441

Do as following:

1- In intelliJ navigate to Project Structure > Modules

2- In the sources tab find target > scala_2.11 > src_managed > main and click on it.

Project Structure

3- Mark in as 'Sources' by clicking the button on top of browsing pane.

4- Click OK

That should be it.

Upvotes: 2

Related Questions