本来liteide挺好用的,本来用的好好,今天突然就没有提示。经过一番研究找到解决办法了,就带领大家把这个问题解决掉

重要的是,要有这种思想,当网上找不到解决办法的时候,自己要有这种思维,自己要能解决。思想有多远,你就能走多远

错误现象描述

fmt.没有代码自动提示,同时发现liteide启动日志报错

启动liteide 错误日志

liteide无法自动补全代码问题解决【go: cannot find GOROOT directory: c:\go】

解决问题过程

启动liteide提示GOROOT环境变量错误

查看go env,go env 没毛病!

liteide无法自动补全代码问题解决【go: cannot find GOROOT directory: c:\go】

然后 就怀疑是 litelide 环境变量有问题,将liteide启动日志 拉到最上面。

liteide无法自动补全代码问题解决【go: cannot find GOROOT directory: c:\go】

有加载liteide的配置文件,怀疑是这里有问题。

liteide无法自动补全代码问题解决【go: cannot find GOROOT directory: c:\go】

将其改为正确路径 ,再启动。发现还是 之前一样的错误!而且配置文件又被改回原样!

liteide无法自动补全代码问题解决【go: cannot find GOROOT directory: c:\go】

确定,这个配置文件是 动态生成的,在打开liteide的时候动态生成的。那就确定是从ide环境中加载生成的配置文件。

找到 liteide的环境配置目录E:\soft\liteide\share\liteide\liteenv,由于笔者的电脑是64位的,查看win-64环境

liteide无法自动补全代码问题解决【go: cannot find GOROOT directory: c:\go】

liteide无法自动补全代码问题解决【go: cannot find GOROOT directory: c:\go】

发现这里有毛病,将其改为正确路径,保存退出。

liteide无法自动补全代码问题解决【go: cannot find GOROOT directory: c:\go】

重启liteide

问题解决

liteide无法自动补全代码问题解决【go: cannot find GOROOT directory: c:\go】

环境正常启动,自动提示可用了!

liteide无法自动补全代码问题解决【go: cannot find GOROOT directory: c:\go】

liteide无法自动补全代码问题解决【go: cannot find GOROOT directory: c:\go】

还是那句话,思想很重要,当网上没有现成方法时,自己要发散思维,或许我们自己都能解决呢。



相关文章:

  • 2022-12-23
  • 2021-06-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-15
  • 2021-11-04
  • 2021-04-03
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-06
  • 2022-12-23
  • 2022-01-11
  • 2021-07-17
  • 2021-10-21
相关资源
相似解决方案