简体   繁体   English

IntelliJ IDEA 中的“找不到要执行的声明”protos 声明

[英]"Cannot find declaration to go" protos declaration in IntelliJ IDEA

I am trying to use gRPC proto file to generate stub code for inter-service communication.我正在尝试使用gRPC proto 文件来生成用于服务间通信的存根代码。 Everything is okay and when I run mvn clean install , it installs everything and builds successfully .一切正常,当我运行mvn clean install ,它会安装所有内容并成功构建。

But still now protos files are in red color and can't go definition when I click to go to it's definition.但是现在protos files仍然是红色的,当我点击它的定义时不能去定义。 It says me Cannot find declaration to go .它说我Cannot find declaration to go When build is successful then why it is not possible to find declaration in IntelliJ IDEA ?当构建成功时,为什么在IntelliJ IDEA找不到声明? I clean every cached on IDE and indexing is also successful .我清理了 IDE 上的每一个cached ,索引也successful I also cleared m2 cache .我还清除了m2 cache

Is there anything to find this solution so that I can go to proto class definition?有什么可以找到这个解决方案,以便我可以去proto class定义?

Any help will be appreciated.任何帮助将不胜感激。

Thanks.谢谢。

在此处输入图片说明

Your IntelliJ IDEA needs to generate Project setup.您的IntelliJ IDEA需要生成项目设置。 So you need to execute the main plugin goal, which is idea:idea .所以你需要执行主要的plugin目标,即idea:idea Use this command.使用此命令。 It will helped me.它会帮助我。

mvn -U idea:idea

Here -U = Forces a check for missing releases and updated snapshots on remote repositories这里-U = 强制检查远程存储库上缺少的版本和更新的快照

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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