简体   繁体   English

IntelliJ 无法识别颤振插件

[英]IntelliJ doesn't recognize flutter plugin

I wanted to try out flutter with IntelliJ, so I followed the order of https://flutter.io/setup-macos/ and everything worked out.我想用 IntelliJ 尝试 flutter,所以我按照https://flutter.io/setup-macos/的顺序操作,一切都解决了。 But today, out of nowhere, it doesn't work anymore.但是今天,突然之间,它不再起作用了。 I can run my code, but reload and hot reload is disabled.我可以运行我的代码,但重新加载和热重新加载被禁用。 So I'd have to close and restart everything, every time, I'd like to see a change.所以我每次都必须关闭并重新启动一切,我希望看到变化。 "flutter doctor" tells me: “扑医生”告诉我:

IntelliJ IDEA Ultimate Edition (version 2017.2.5)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
• Dart plugin version 172.4155.35
• For information about installing plugins, see
  https://flutter.io/intellij-setup/#installing-the-plugins

But I looked it up, and flutter clearly was installed.但是我查了一下,明显安装了flutter。 I honestly sit here for 5 hours now, trying to figure it out, but I just can't find the problem.老实说,我现在在这里坐了 5 个小时,试图弄清楚,但我就是找不到问题所在。 I deleted and reinstalled Flutter, Dart and IntelliJ like 4 times now, but it didn't work either.我现在删除并重新安装了 Flutter、Dart 和 IntelliJ 4 次,但它也不起作用。

Flutter in generall works, at least I can run the app in the terminal, so the problem got to be with IntelliJ. Flutter 通常可以工作,至少我可以在终端中运行该应用程序,所以问题出在 IntelliJ 上。 I also deleted the following folders:我还删除了以下文件夹:

macOS
~/Library/Application Support/IntelliJIdeaXX
~/Library/Preferences/IntelliJIdeaXX
~/Library/Caches/IntelliJIdeaXX
~/Library/Logs/IntelliJIdeaXX 

Does anyone have an idea of what I can do now?有没有人知道我现在可以做什么?

It was reported several times recently.最近被多次报道。 master is the development branch with some newer code. master是带有一些较新代码的开发分支。 alpha dev (default) is the recommended channel, but there are currently issues with dev which are already fixed in master . alpha dev (默认)是推荐的频道,但目前dev问题已经在master修复。 dev will be updated soon and it's recommended to switch back to dev when the fixes have landed. dev将很快更新,建议在修复完成后切换回dev

flutter channel master

to switch back later稍后切换回来

flutter channel alpha 颤振通道阿尔法

flutter channel dev

In case somebody is still looking for an answer for this... Jetbrains has changed the plugins directory since the 2020.x versions (2019 - 2020)如果有人仍在为此寻找答案......自 2020.x 版本(2019 - 2020)以来,Jetbrains 已更改插件目录

Windows: from: %HOMEPATH%\\.\\config\\plugins to: %APPDATA%\\JetBrains\\\\plugins Windows:从:%HOMEPATH%\\.\\config\\plugins 到:%APPDATA%\\JetBrains\\\\plugins

MacOS: from: ~/Library/Application Support/ to: ~/Library/Application Support/JetBrains//plugins MacOS:从:~/Library/Application Support/ 到:~/Library/Application Support/JetBrains//plugins

Linux: from: ~/./config/plugins to: ~/.local/share/JetBrains/ Linux:从:~/./config/plugins 到:~/.local/share/JetBrains/

To fix the problem before a flutter update, I just created a symbolic link of my plugins directory (I use mac):为了在 flutter 更新之前解决这个问题,我刚刚创建了我的插件目录的符号链接(我使用的是 mac):

ln -s /Users/xxx/Library/Application\ Support/JetBrains/IntelliJIdea2020.1/plugins /Users/xxx/Library/Application\ Support/IntelliJIdea2020.1

That did the trick for me!这对我有用! I hope it helps others as well :)我希望它也能帮助其他人:)

Cheers.干杯。

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

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