dougudu3564 2016-10-09 04:10
浏览 3850

为什么在IntelliJ Idea中找不到要去的声明?

I have a code in go, and I am using IntelliJIdea for development. It used to work fine, but since the time I have changed the folder where the code used to be, IntelliJ has been behaving in a weird manner. It shows me a lot of unable to find declaration to go to errors. After changing the folder where my project used to be, I changed the GOPATH and imported from the new directory once again.

I am attaching the screenshot as that will be better for understanding.

See the conductor.Start(). This function is right there in the package app. But it can't find this.

PS: I have tried importing the project from scratch and invalidating and restarting multiple times, but that didn't help.

  • 写回答

1条回答 默认 最新

  • doulang6013 2017-10-05 08:15
    关注

    I'm using Gogland, which is also a JetBrains IDE, but I also had a problem with symbols not getting resolved.

    I fixed it by deleting the project's index file.

    1. Close the IDE.
    2. In your project directory, find a directory named ".idea".
    3. Delete all files with the extension ".iml" in that directory.
    4. Restart the IDE.

    The project should get reindexed and symbols will be resolved.

    https://www.jetbrains.org/intellij/sdk/docs/basics/project_structure.html?search=.iml

    评论
    编辑
    预览

    报告相同问题?

    手机看
    程序员都在用的中文IT技术交流社区

    程序员都在用的中文IT技术交流社区

    专业的中文 IT 技术社区,与千万技术人共成长

    专业的中文 IT 技术社区,与千万技术人共成长

    关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

    关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

    客服 返回
    顶部