简体   繁体   中英

Why do I see cannot resolve symbol on main method while editting configurations on Intellij?

I am new to IntelliJ IDEA, and I am trying to edit configurations for an imported Gradle project. It says "Cannot resolve symbol udacity."

这是它的图片

What can I do to fix it?

Thanks :)

So you have git cloned the project to a folder ud282-master and there is a subfolder in there Project 1 - TicTacToe .

In Intellij if you have another project open go to File -> New -> Project From Existing Sources... or if you don't have a project open go to Import project .

In both cases pick the folder Project 1 - TicTacToe to import from because that's where the gradle files are. In the next screen pick Import project from external model -> Gradle .

Then you should be able to make a new Run Configuration specifying in Use classpath or module the module Project_1_-_TicTacToe_main and not Project 1 - TicTacToe . Then just pick com.udacity.Game from the dropdown.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM